All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Peter Xu <peterx@redhat.com>
Cc: Andrei Gudkov <gudkov.andrei@huawei.com>,
	 qemu-devel@nongnu.org, quintela@redhat.com,  leobras@redhat.com,
	 eblake@redhat.com
Subject: Re: [PATCH] qapi: better docs for calc-dirty-rate and friends
Date: Fri, 26 May 2023 13:23:07 +0200	[thread overview]
Message-ID: <87y1lbbalg.fsf@pond.sub.org> (raw)
In-Reply-To: <ZG9i20k6x8n+ydTq@x1n> (Peter Xu's message of "Thu, 25 May 2023 09:30:03 -0400")

Peter Xu <peterx@redhat.com> writes:

> On Thu, May 25, 2023 at 03:08:35PM +0200, Markus Armbruster wrote:
>> Andrei Gudkov <gudkov.andrei@huawei.com> writes:
>> 
>> > Rewrote calc-dirty-rate documentation. Briefly described
>> > different modes of dirty page rate measurement. Added some
>> > examples. Fixed obvious grammar errors.
>> >
>> > Signed-off-by: Andrei Gudkov <gudkov.andrei@huawei.com>
>> > ---
>> >  qapi/migration.json | 107 +++++++++++++++++++++++++++++++-------------
>> >  1 file changed, 77 insertions(+), 30 deletions(-)
>> >
>> > diff --git a/qapi/migration.json b/qapi/migration.json
>> > index 179af0c4d8..19b51444b5 100644
>> > --- a/qapi/migration.json
>> > +++ b/qapi/migration.json

[...]

>> > +# Dirty page rate is the number of pages changed in a given time
>> > +# period expressed in MiB/s.  The following methods of calculation
>> > +# are available:
>> > +#
>> > +# 1. In page sampling mode, a random subset of pages are selected
>> > +#    and hashed twice: once in the beginning of measurement time
>> 
>> Suggest "once at the beginning"
>> 
>> > +#    period, another one -- in the end.  If two hashes for some page
>> 
>> Suggest ", and once again at the end".
>> 
>> > +#    are different, the page is counted as changed.  Since this
>> > +#    method relies on sampling and hashing, calculated dirty page
>> > +#    rate is only the estimation of its true value.  Setting
>> > +#    @sample-pages to higher value improves estimation quality but
>> 
>> Suggest "Increasing @sample-pages improves estimation quality at the
>> cost ..."
>> 
>> > +#    at the cost of higher computational overhead.
>> > +#
>> > +# 2. Dirty bitmap mode captures writes to memory by temporarily
>> > +#    revoking write access to all pages and counting page faults.
>
> Just to mention that wr-protection is only one way to do this, IIUC that
> depends on both arch (e.g. s390 impl KVM_GET_DIRTY_LOG totally differently
> from x86) and also hardware capabilities (e.g. even on x86, PML enabled
> hosts use dirty bits and PML-full vm exits rather than page faults).

Good point.

> But I think wr-protect may still be a good detailed showcase of it so
> keeping it there looks very nice, perhaps just add "... writes to memory,
> for example, by temporarily revoking ..."?

Going with

      # 2. Dirty bitmap mode captures writes to memory (for example by
      #    temporarily revoking write access to all pages) and counting page
      #    faults.  Information about modified pages is collected into a
      #    bitmap, where each bit corresponds to one guest page.  This mode
      #    requires that KVM accelerator property "dirty-ring-size" is *not*
      #    set.

if you don't mind.

[...]

>> This is *sooo* much better than before.  Thank you!
>
> I also agree. :)
>
>> 
>> An R-by from a migration maintainer would be nice.
>
> Only one migration maintainer now, but we have two reviewers.
>
> Here's one from the reviewers' list:
>
> Acked-by: Peter Xu <peterx@redhat.com>

Thanks!

[...]



  reply	other threads:[~2023-05-26 11:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-23 15:19 [PATCH] qapi: better docs for calc-dirty-rate and friends Andrei Gudkov via
2023-05-25 13:08 ` Markus Armbruster
2023-05-25 13:30   ` Peter Xu
2023-05-26 11:23     ` Markus Armbruster [this message]
2023-05-26 13:36       ` Peter Xu
2023-05-26  9:25   ` gudkov.andrei--- via
2023-05-26 11:24     ` Markus Armbruster

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=87y1lbbalg.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=gudkov.andrei@huawei.com \
    --cc=leobras@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /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.