From: Peter Xu <peterx@redhat.com>
To: Hao Xiang <hao.xiang@bytedance.com>
Cc: Jiri Denemark <jdenemar@redhat.com>,
qemu-devel@nongnu.org, farosas@suse.de
Subject: Re: [External] Re: Re: [PATCH 2/6] migration/multifd: Add zero pages and zero bytes counter to migration status interface.
Date: Thu, 8 Feb 2024 10:51:26 +0800 [thread overview]
Message-ID: <ZcRBrmTfxQixTeaJ@x1n> (raw)
In-Reply-To: <CAAYibXi3BUxjg+b1ZXiT_AnnV5LkAN11G-UZc6bZQr4sFz5uzw@mail.gmail.com>
On Wed, Feb 07, 2024 at 03:44:18PM -0800, Hao Xiang wrote:
> On Wed, Feb 7, 2024 at 12:41 AM Jiri Denemark <jdenemar@redhat.com> wrote:
> >
> > On Wed, Feb 07, 2024 at 12:37:15 +0800, Peter Xu wrote:
> > > On Wed, Feb 07, 2024 at 12:13:10PM +0800, Peter Xu wrote:
> > > > On Tue, Feb 06, 2024 at 11:19:04PM +0000, Hao Xiang wrote:
> > > > > This change extends the MigrationStatus interface to track zero pages
> > > > > and zero bytes counter.
> > > > >
> > > > > Signed-off-by: Hao Xiang <hao.xiang@bytedance.com>
> > > >
> > > > Reviewed-by: Peter Xu <peterx@redhat.com>
> > >
> > > I'll need to scratch this, sorry..
> > >
> > > The issue is I forgot we have "duplicate" which is exactly "zero
> > > page"s.. See:
> > >
> > > info->ram->duplicate = stat64_get(&mig_stats.zero_pages);
> > >
> > > If you think the name too confusing and want a replacement, maybe it's fine
> > > and maybe we can do that. Then we can keep this zero page counter
> > > introduced, reporting the same value as duplicates, then with a follow up
> > > patch to deprecate "duplicate" parameter. See an exmaple on how to
> > > deprecate in 7b24d326348e1672.
> > >
> > > One thing I'm not sure is whether Libvirt will be fine on losing
> > > "duplicates" after 2+ QEMU major releases. Copy Jiri for this. My
> > > understanding is that Libvirt should be keeping an eye on deprecation list
> > > and react, but I'd like to double check..
> >
> > This should not be a big deal as we can internally map either one
> > (depending on what QEMU supports) to the same libvirt's field. AFAIK
> > there is a consensus on Cc-ing libvirt-devel on patches that deprecate
I see.
> > QEMU interfaces so that we can update our code in time before the
> > deprecated interface is dropped.
Right.
What I mostly worried is "old libvirt" + "new qemu", where the old libvirt
only knows "duplicates", while the new (after 2 releases) will only report
"zeros".
> >
> > BTW, libvirt maps "duplicate" to:
> >
> > /**
> > * VIR_DOMAIN_JOB_MEMORY_CONSTANT:
> > *
> > * virDomainGetJobStats field: number of pages filled with a constant
> > * byte (all bytes in a single page are identical) transferred since the
> > * beginning of the migration job, as VIR_TYPED_PARAM_ULLONG.
> > *
> > * The most common example of such pages are zero pages, i.e., pages filled
> > * with zero bytes.
> > *
> > * Since: 1.0.3
> > */
> > # define VIR_DOMAIN_JOB_MEMORY_CONSTANT "memory_constant"
> >
> > Jirka
> >
>
> Interesting. I didn't notice the existence of "duplicate" for zero
> pages. I do think the name is quite confusing. I will create the
> "zero/zero_bytes" counter and a separate commit to deprecate
> "duplicate". Will add libvirt devs per instruction above.
Yeah, please go ahead, and I hope my worry is not a real concern above; we
can figure that out later. Even without deprecating "duplicate", maybe
it'll at least still be worthwhile we start having "zeros" reported
alongside. Then after 10/20/30/N years we always have a chance to
deprecate the other one, just a matter of compatible window.
Thanks,
--
Peter Xu
next prev parent reply other threads:[~2024-02-08 2:52 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-06 23:19 [PATCH 0/6] Introduce multifd zero page checking Hao Xiang
2024-02-06 23:19 ` [PATCH 1/6] migration/multifd: Add new migration option multifd-zero-page Hao Xiang
2024-02-07 3:44 ` Peter Xu
2024-02-08 0:49 ` [External] " Hao Xiang
2024-02-06 23:19 ` [PATCH 2/6] migration/multifd: Add zero pages and zero bytes counter to migration status interface Hao Xiang
2024-02-07 4:13 ` Peter Xu
2024-02-07 4:37 ` Peter Xu
2024-02-07 8:41 ` Jiri Denemark
2024-02-07 23:44 ` [External] " Hao Xiang
2024-02-08 2:51 ` Peter Xu [this message]
2024-02-06 23:19 ` [PATCH 3/6] migration/multifd: Support for zero pages transmission in multifd format Hao Xiang
2024-02-07 4:25 ` Peter Xu
2024-02-08 19:03 ` [External] " Hao Xiang
2024-02-06 23:19 ` [PATCH 4/6] migration/multifd: Zero page transmission on the multifd thread Hao Xiang
2024-02-07 4:45 ` Peter Xu
2024-02-06 23:19 ` [PATCH 5/6] migration/multifd: Enable zero page checking from multifd threads Hao Xiang
2024-02-06 23:19 ` [PATCH 6/6] migration/multifd: Add a new migration test case for legacy zero page checking Hao Xiang
2024-02-07 3:39 ` [PATCH 0/6] Introduce multifd " Peter Xu
2024-02-08 0:47 ` [External] " Hao Xiang
2024-02-08 2:36 ` 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=ZcRBrmTfxQixTeaJ@x1n \
--to=peterx@redhat.com \
--cc=farosas@suse.de \
--cc=hao.xiang@bytedance.com \
--cc=jdenemar@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 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).