From: Max Reitz <mreitz@redhat.com>
To: John Snow <jsnow@redhat.com>,
qemu-block@nongnu.org, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 6/8] block/backup: issue progress updates for skipped regions
Date: Wed, 10 Jul 2019 22:30:23 +0200 [thread overview]
Message-ID: <4e9b8a92-c98d-0f19-3f8f-636dc64ca0b4@redhat.com> (raw)
In-Reply-To: <5b3f6dad-c438-861f-b4cf-236b3f058322@redhat.com>
[-- Attachment #1.1: Type: text/plain, Size: 2225 bytes --]
On 10.07.19 20:20, John Snow wrote:
>
>
> On 7/10/19 12:36 PM, Max Reitz wrote:
>> On 10.07.19 03:05, John Snow wrote:
>>> The way bitmap backups work is by starting at 75% if it needs
>>> to copy just 25% of the disk.
>>
>> Although there is this comment:
>>
>>> /* TODO job_progress_set_remaining() would make more sense */
>>
>> So...
>>
>>> The way sync=top currently works, however, is to start at 0% and then
>>> never update the progress if it doesn't copy a region. If it needs to
>>> copy 25% of the disk, we'll finish at 25%.
>>>
>>> Update the progress when we skip regions.
>>
>> Wouldn’t it be more correct to decrease the job length?
>>
>> Max
>>
>
> Admittedly I have precisely no idea. Maybe? As far as I understand it,
> we guarantee only:
>
> (1) Progress monotonically increases
> (2) Upon completion, progress will equal the total work estimate.
> [Trying to fix that to be true here.]
>
> This means we can do stuff like:
>
> - Total work estimate can increase or decrease arbitrarily
> - Neither value has to mean anything in particular
>
>
> Bitmap sync works by artificially increasing progress for NOP regions,
> seen in init_copy_bitmap.
Yes, and it has a TODO comment that says it should be done differently.
> Full sync also tends to increase progress regardless of it actually did
> a copy or not; offload support also counts as progress here. So if you
> full sync an empty image, you'll see it increasing the progress as it
> doesn't actually do anything.
>
> Top sync is the odd one out, which just omits progress for regions it skips.
>
> My only motivation here was to make them consistent. Can I do it the
> other way? Yeah, probably. Is one way better than the other? I
> legitimately have no idea. I guess whoever wrote the last comment felt
> that it should all be the other way instead. Why'd they not do that?
If you look at the commit (05df8a6a2b4), I suppose it was because that
commit simply did not intend to change behavior. It just touched that
piece of code and noted that maybe there should be a follow-up commit to
change it.
But yeah, whatever.
Reviewed-by: Max Reitz <mreitz@redhat.com>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-07-10 20:32 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-10 1:05 [Qemu-devel] [PATCH 0/8] bitmaps: allow bitmaps to be used with full and top John Snow
2019-07-10 1:05 ` [Qemu-devel] [PATCH 1/8] iotests/257: add Pattern class John Snow
2019-07-10 15:10 ` Max Reitz
2019-07-10 16:26 ` Max Reitz
2019-07-10 17:34 ` John Snow
2019-07-10 1:05 ` [Qemu-devel] [PATCH 2/8] iotests/257: add EmulatedBitmap class John Snow
2019-07-10 15:47 ` Max Reitz
2019-07-10 17:36 ` John Snow
2019-07-10 1:05 ` [Qemu-devel] [PATCH 3/8] iotests/257: Refactor backup helpers John Snow
2019-07-10 16:04 ` Max Reitz
2019-07-10 17:52 ` John Snow
2019-07-10 20:17 ` Max Reitz
2019-07-10 1:05 ` [Qemu-devel] [PATCH 4/8] block/backup: hoist bitmap check into QMP interface John Snow
2019-07-10 16:11 ` Max Reitz
2019-07-10 17:57 ` John Snow
2019-07-10 20:19 ` Max Reitz
2019-07-10 1:05 ` [Qemu-devel] [PATCH 5/8] iotests/257: test API failures John Snow
2019-07-10 16:22 ` Max Reitz
2019-07-10 18:00 ` John Snow
2019-07-10 1:05 ` [Qemu-devel] [PATCH 6/8] block/backup: issue progress updates for skipped regions John Snow
2019-07-10 16:36 ` Max Reitz
2019-07-10 18:20 ` John Snow
2019-07-10 20:30 ` Max Reitz [this message]
2019-07-10 20:47 ` John Snow
2019-07-10 20:53 ` Max Reitz
2019-07-10 1:05 ` [Qemu-devel] [PATCH 7/8] block/backup: support bitmap sync modes for non-bitmap backups John Snow
2019-07-10 16:48 ` Max Reitz
2019-07-10 18:32 ` John Snow
2019-07-10 20:39 ` Max Reitz
2019-07-10 1:05 ` [Qemu-devel] [PATCH 8/8] iotests/257: test traditional sync modes John Snow
2019-07-10 17:14 ` Max Reitz
2019-07-10 19:00 ` John Snow
2019-07-10 20:46 ` Max Reitz
[not found] ` <2f221513-f173-8d9f-a3b2-d790ef6f6f51@redhat.com>
2019-07-11 12:37 ` Max Reitz
2019-07-11 17:58 ` John Snow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4e9b8a92-c98d-0f19-3f8f-636dc64ca0b4@redhat.com \
--to=mreitz@redhat.com \
--cc=armbru@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).