From: Fabiano Rosas <farosas@suse.de>
To: Prasad Pandit <ppandit@redhat.com>, qemu-devel@nongnu.org
Cc: peterx@redhat.com, berrange@redhat.com,
Prasad Pandit <pjp@fedoraproject.org>
Subject: Re: [PATCH v10 3/3] migration: write zero pages when postcopy enabled
Date: Thu, 08 May 2025 10:57:19 -0300 [thread overview]
Message-ID: <87ecwzfbnk.fsf@suse.de> (raw)
In-Reply-To: <20250508122849.207213-4-ppandit@redhat.com>
Prasad Pandit <ppandit@redhat.com> writes:
> From: Prasad Pandit <pjp@fedoraproject.org>
>
> During multifd migration, zero pages are are written if
> they are migrated more than ones.
s/ones/once/
>
> This may result in a migration hang issue when Multifd
> and Postcopy are enabled together.
>
> When Postcopy is enabled, always write zero pages as and
> when they are migrated.
>
> Signed-off-by: Prasad Pandit <pjp@fedoraproject.org>
This patch should come before 1/3, otherwise it'll break bisect.
> ---
> migration/multifd-zero-page.c | 22 ++++++++++++++++++++--
> 1 file changed, 20 insertions(+), 2 deletions(-)
>
> v10: new patch, not present in v9 or earlier versions.
>
> diff --git a/migration/multifd-zero-page.c b/migration/multifd-zero-page.c
> index dbc1184921..9bfb3ef803 100644
> --- a/migration/multifd-zero-page.c
> +++ b/migration/multifd-zero-page.c
> @@ -85,9 +85,27 @@ void multifd_recv_zero_page_process(MultiFDRecvParams *p)
> {
> for (int i = 0; i < p->zero_num; i++) {
> void *page = p->host + p->zero[i];
> - if (ramblock_recv_bitmap_test_byte_offset(p->block, p->zero[i])) {
> +
> + /*
> + * During multifd migration zero page is written to the memory
> + * only if it is migrated more than ones.
s/ones/once/
> + *
> + * It becomes a problem when both Multifd & Postcopy options are
> + * enabled. If the zero page which was skipped during multifd phase,
> + * is accessed during the Postcopy phase of the migration, a page
> + * fault occurs. But this page fault is not served because the
> + * 'receivedmap' says the zero page is already received. Thus the
> + * migration hangs.
> + *
> + * When Postcopy is enabled, always write the zero page as and when
> + * it is migrated.
> + *
extra blank line here^
> + */
nit: Inconsistent use of capitalization for the feature names. I'd keep
it all lowercase.
> + if (migrate_postcopy_ram() ||
> + ramblock_recv_bitmap_test_byte_offset(p->block, p->zero[i])) {
> memset(page, 0, multifd_ram_page_size());
> - } else {
> + }
> + if (!ramblock_recv_bitmap_test_byte_offset(p->block, p->zero[i])) {
> ramblock_recv_bitmap_set_offset(p->block, p->zero[i]);
> }
> }
next prev parent reply other threads:[~2025-05-08 13:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-08 12:28 [PATCH v10 0/3] Allow to enable multifd and postcopy migration together Prasad Pandit
2025-05-08 12:28 ` [PATCH v10 1/3] migration: enable multifd and postcopy together Prasad Pandit
2025-05-08 14:06 ` Fabiano Rosas
2025-05-08 12:28 ` [PATCH v10 2/3] tests/qtest/migration: add postcopy tests with multifd Prasad Pandit
2025-05-08 19:04 ` Peter Xu
2025-05-09 5:26 ` Prasad Pandit
2025-05-09 14:30 ` Peter Xu
2025-05-13 6:20 ` Prasad Pandit
2025-05-08 12:28 ` [PATCH v10 3/3] migration: write zero pages when postcopy enabled Prasad Pandit
2025-05-08 13:57 ` Fabiano Rosas [this message]
2025-05-08 15:40 ` Peter Xu
2025-05-09 6:04 ` Prasad Pandit
2025-05-09 15:11 ` Peter Xu
2025-05-12 6:26 ` Prasad Pandit
2025-05-12 15:06 ` Peter Xu
2025-05-09 5:31 ` Prasad Pandit
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=87ecwzfbnk.fsf@suse.de \
--to=farosas@suse.de \
--cc=berrange@redhat.com \
--cc=peterx@redhat.com \
--cc=pjp@fedoraproject.org \
--cc=ppandit@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.