From: Juan Quintela <quintela@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Cc: qemu-devel@nongnu.org, Eric Blake <eblake@redhat.com>,
John Snow <jsnow@redhat.com>,
Richard Henderson <richard.henderson@linaro.org>,
Fam Zheng <fam@euphon.net>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Thomas Huth <thuth@redhat.com>,
Alex Williamson <alex.williamson@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
qemu-s390x@nongnu.org, Halil Pasic <pasic@linux.ibm.com>,
Eric Farman <farman@linux.ibm.com>,
qemu-block@nongnu.org, David Hildenbrand <david@redhat.com>,
Ilya Leoshkevich <iii@linux.ibm.com>
Subject: Re: [PULL 5/5] migration: simplify migration_iteration_run()
Date: Thu, 02 Feb 2023 16:09:27 +0100 [thread overview]
Message-ID: <874js4p0ig.fsf@secure.mitica> (raw)
In-Reply-To: <38da6faf-1d7f-66fc-b305-738a6e8dfaf1@yandex-team.ru> (Vladimir Sementsov-Ogievskiy's message of "Tue, 31 Jan 2023 14:44:14 +0300")
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> wrote:
> On 30.01.23 11:03, Juan Quintela wrote:
>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
>> ---
>> migration/migration.c | 24 ++++++++++++------------
>> 1 file changed, 12 insertions(+), 12 deletions(-)
>> diff --git a/migration/migration.c b/migration/migration.c
>> index 594a42f085..644c61e91d 100644
>> --- a/migration/migration.c
>> +++ b/migration/migration.c
>> @@ -3764,23 +3764,23 @@ static MigIterateState migration_iteration_run(MigrationState *s)
>> pend_pre, pend_compat, pend_post);
>> }
>> - if (pending_size && pending_size >= s->threshold_size) {
>> - /* Still a significant amount to transfer */
>> - if (!in_postcopy && pend_pre <= s->threshold_size &&
>> - qatomic_read(&s->start_postcopy)) {
>> - if (postcopy_start(s)) {
>> - error_report("%s: postcopy failed to start", __func__);
>> - }
>> - return MIG_ITERATE_SKIP;
>> - }
>> - /* Just another iteration step */
>> - qemu_savevm_state_iterate(s->to_dst_file, in_postcopy);
>> - } else {
>> + if (pending_size < s->threshold_size) {
>
> to keep the logic, formally it should be "if (!pending_size || pending_size < s->threshold_size)"...
And here I am, back.
To stand corrected O:-)
I have to do the change that you suggested.
Why? Because it never ever happens with "real" migrations.
But qemu-iotest 181, well, sometimes it fails.
Never when you compile x86_64.
You need to compile all architectures.
And it fails only sometimes.
Ok, changed to
if (!pending_size || pending_size < s->threshold_size)
Thanks, Juan.
> Actually, could s->threshold_size be 0 here? Or, worth an assertion
> assert(s->threshold_size) ?
This test in particular sets the "bandwidth_limit" to 4k, that is one
page, so it could be that gets zero.
Later, Juan.
next prev parent reply other threads:[~2023-02-02 15:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-30 8:03 [PULL 0/5] Next patches Juan Quintela
2023-01-30 8:03 ` [PULL 1/5] migration: Fix migration crash when target psize larger than host Juan Quintela
2023-01-30 8:03 ` [PULL 2/5] migration: No save_live_pending() method uses the QEMUFile parameter Juan Quintela
2023-01-30 8:03 ` [PULL 3/5] migration: Split save_live_pending() into state_pending_* Juan Quintela
2023-01-30 8:03 ` [PULL 4/5] migration: Remove unused threshold_size parameter Juan Quintela
2023-01-30 8:03 ` [PULL 5/5] migration: simplify migration_iteration_run() Juan Quintela
2023-01-31 11:44 ` Vladimir Sementsov-Ogievskiy
2023-02-02 10:24 ` Juan Quintela
2023-02-02 15:09 ` Juan Quintela [this message]
2023-02-02 15:11 ` [PULL 0/5] Next patches Juan Quintela
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=874js4p0ig.fsf@secure.mitica \
--to=quintela@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=borntraeger@linux.ibm.com \
--cc=david@redhat.com \
--cc=dgilbert@redhat.com \
--cc=eblake@redhat.com \
--cc=fam@euphon.net \
--cc=farman@linux.ibm.com \
--cc=iii@linux.ibm.com \
--cc=jsnow@redhat.com \
--cc=pasic@linux.ibm.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=stefanha@redhat.com \
--cc=thuth@redhat.com \
--cc=vsementsov@yandex-team.ru \
/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).