From: Peter Xu <peterx@redhat.com>
To: "Chaney, Ben" <bchaney@akamai.com>
Cc: "yury-kotov@yandex-team.ru" <yury-kotov@yandex-team.ru>,
"dgilbert@redhat.com" <dgilbert@redhat.com>,
"beata.michalska@linaro.org" <beata.michalska@linaro.org>,
"richard.henderson@linaro.org" <richard.henderson@linaro.org>,
"alex.bennee@linaro.org" <alex.bennee@linaro.org>,
"peter.maydell@linaro.org" <peter.maydell@linaro.org>,
"junyan.he@intel.com" <junyan.he@intel.com>,
"stefanha@redhat.com" <stefanha@redhat.com>,
"imammedo@redhat.com" <imammedo@redhat.com>,
"mst@redhat.com" <mst@redhat.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"pbonzini@redhat.com" <pbonzini@redhat.com>,
"david@redhat.com" <david@redhat.com>,
"philmd@linaro.org" <philmd@linaro.org>,
"xiaoguangrong.eric@gmail.com" <xiaoguangrong.eric@gmail.com>,
"Tottenham, Max" <mtottenh@akamai.com>,
"Hunt, Joshua" <johunt@akamai.com>,
"Glasgall, Anna" <aglasgal@akamai.com>
Subject: Re: live-migration performance regression when using pmem
Date: Wed, 14 May 2025 12:41:38 -0400 [thread overview]
Message-ID: <aCTHwhrXROReEPEh@x1.local> (raw)
In-Reply-To: <777D8A12-8D44-4A67-B767-988C81C60D21@akamai.com>
On Tue, May 13, 2025 at 03:48:06PM +0000, Chaney, Ben wrote:
> On 5/12/25, 2:50 PM, "Peter Xu" <peterx@redhat.com <mailto:peterx@redhat.com>> wrote:
>
>
> > What you said makes sense to me, but I'm neither pmem user nor
> > expert. Let's wait to see whether others would like to chime in.
>
>
> > What's the first bad commit of the regression? Is it since v10.0 release?
>
> Hi Peter,
> We are still on an old branch (7.2). The issue began when we enabled pmem, not as the result of a code change.
OK. Then I think it's not strictly a regression, as it may have been like
that forever.
I do see that qemu_ram_msync() has this anyway:
#ifdef CONFIG_LIBPMEM
/* The lack of support for pmem should not block the sync */
if (ramblock_is_pmem(block)) {
void *addr = ramblock_ptr(block, start);
pmem_persist(addr, length);
return;
}
#endif
Does it mean that you're using pmem but without libpmem compiled? From
your stack dump, it looks like msync() is triggered and I would expect that
won't happen if the ramblock in question is pmem.
Is your case using DRAM as the backing storage (in form of DAX) for the
ext4 file, while exposed as a pmem to the guest? I'd expect if at least
with above check pass then pmem_persist() would be faster, though I don't
know how much.
It looks still reasonable for QEMU to always sync here if it's pmem then,
because qemu still sees this ramblock a persist storage, and after
migration qemu wants to make sure all things are persisted. Said that, I
wonder if David was right in the other email that we still have some
regression and at least migration should skip the sync for !pmem, that is:
diff --git a/migration/ram.c b/migration/ram.c
index d26dbd37c4..a93da18842 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -3672,7 +3672,9 @@ static int ram_load_cleanup(void *opaque)
RAMBlock *rb;
RAMBLOCK_FOREACH_NOT_IGNORED(rb) {
- qemu_ram_block_writeback(rb);
+ if (ramblock_is_pmem(block)) {
+ qemu_ram_block_writeback(rb);
+ }
}
xbzrle_load_cleanup();
But if you're using a real pmem ramblock, it shouldn't affect your use
case.
Thanks,
--
Peter Xu
next prev parent reply other threads:[~2025-05-14 16:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-12 15:16 live-migration performance regression when using pmem Chaney, Ben
2025-05-12 18:50 ` Peter Xu
2025-05-13 15:48 ` Chaney, Ben
2025-05-14 16:41 ` Peter Xu [this message]
2025-05-12 19:52 ` Michael S. Tsirkin
2025-05-13 17:21 ` David Hildenbrand
2025-05-13 18:40 ` Chaney, Ben
2025-05-13 20:11 ` Michael S. Tsirkin
2025-05-14 13:57 ` David Hildenbrand
2025-06-12 15:34 ` Chaney, Ben
2025-06-12 16:06 ` Peter Xu
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=aCTHwhrXROReEPEh@x1.local \
--to=peterx@redhat.com \
--cc=aglasgal@akamai.com \
--cc=alex.bennee@linaro.org \
--cc=bchaney@akamai.com \
--cc=beata.michalska@linaro.org \
--cc=david@redhat.com \
--cc=dgilbert@redhat.com \
--cc=imammedo@redhat.com \
--cc=johunt@akamai.com \
--cc=junyan.he@intel.com \
--cc=mst@redhat.com \
--cc=mtottenh@akamai.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=stefanha@redhat.com \
--cc=xiaoguangrong.eric@gmail.com \
--cc=yury-kotov@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).