qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: huangy81@chinatelecom.cn
Cc: Eduardo Habkost <ehabkost@redhat.com>,
	Juan Quintela <quintela@redhat.com>,
	qemu-devel@nongnu.org,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH v3 4/7] migration/dirtyrate: add per-vcpu option for calc-dirty-rate
Date: Mon, 7 Jun 2021 11:46:27 -0400	[thread overview]
Message-ID: <YL4/U2Kjojyr2wcT@t490s> (raw)
In-Reply-To: <19ad91782f5798844c42e34683fda833f9d1928a.1623027729.git.huangy81@chinatelecom.cn>

On Mon, Jun 07, 2021 at 09:12:36AM +0800, huangy81@chinatelecom.cn wrote:
> @@ -1751,7 +1770,9 @@
>             'status': 'DirtyRateStatus',
>             'start-time': 'int64',
>             'calc-time': 'int64',
> -           'sample-pages': 'uint64'} }
> +           '*sample-pages': 'uint64',
> +           'per-vcpu': 'bool',
> +           '*vcpu-dirty-rate': [ 'DirtyRateVcpu' ] } }

Ideally we shouldn't touch existing exported fields?  I know it's not a problem
since it's just introduced and together with the series..  The other
alternative is to keep it as is but just ignore it in the result (or set it to
zero for per-vcpu sampling)?  No strong opinion.

>  
>  ##
>  # @calc-dirty-rate:
> @@ -1760,6 +1781,10 @@
>  #
>  # @calc-time: time in units of second for sample dirty pages
>  #
> +# @per-vcpu: calculate vcpu dirty rate if true, the default value is
> +#            false, note that the per-vcpu and sample-pages are mutually
> +#            exclusive (since 6.1)
> +#
>  # @sample-pages: page count per GB for sample dirty pages
>  #                the default value is 512 (since 6.1)
>  #
> @@ -1769,7 +1794,7 @@
>  #   {"command": "calc-dirty-rate", "data": {"calc-time": 1, 'sample-pages': 512} }
>  #
>  ##
> -{ 'command': 'calc-dirty-rate', 'data': {'calc-time': 'int64', '*sample-pages': 'int'} }
> +{ 'command': 'calc-dirty-rate', 'data': {'calc-time': 'int64', 'per-vcpu': 'bool', '*sample-pages': 'int'} }

I still think exporting this new feature should happen as/in the last patch.

Also, wondering whether the name "per-vcpu" would let people think of "samping
pages per-vcpu only", not showing that it's a completely new mechanism inside.
How about make it a new parameter "*mode" (and I think even with per-vcpu it
should be optional as "*per-vcpu") default to "page-sampling" and add a new
"dirty-ring"?

Actually I'm also wondering whether dirty log could be anything useful here in
the future as a 3rd mode (then the "*mode" idea should be more useful if so),
basically for old kernels where dirty ring is not there, we can timely call
memory_global_dirty_log_sync() and calculate dirty pages there just like what
we do with dirty rings (without calling migration_bitmap_sync(), so we don't
need to deliver dirty bits from kvmslots to ramblocks, just pick them up from
kvm and do the accounting for pure dirty rate measurement).  That's a wild idea
though, so just raise it up.  Would that be anything useful?

-- 
Peter Xu



  reply	other threads:[~2021-06-07 15:47 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07  1:11 [PATCH v3 0/7] support dirtyrate at the granualrity of vcpu huangy81
2021-06-07  1:11 ` [PATCH v3 1/7] migration/dirtyrate: make sample page count configurable huangy81
2021-06-07 18:18   ` Eric Blake
2021-06-08 19:02     ` Dr. David Alan Gilbert
2021-06-07  1:11 ` [PATCH v3 2/7] hmp: Add "calc_dirty_rate" and "info dirty_rate" cmds huangy81
2021-06-08 19:04   ` Dr. David Alan Gilbert
2021-06-08 19:06   ` Dr. David Alan Gilbert
2021-06-07  1:12 ` [PATCH v3 3/7] KVM: introduce dirty_pages and kvm_dirty_ring_enabled huangy81
2021-06-07  1:12 ` [PATCH v3 4/7] migration/dirtyrate: add per-vcpu option for calc-dirty-rate huangy81
2021-06-07 15:46   ` Peter Xu [this message]
2021-06-07 16:16     ` Hyman Huang
2021-06-07 17:13       ` Peter Xu
2021-06-07  1:12 ` [PATCH v3 5/7] migration/dirtyrate: adjust struct DirtyRateStat huangy81
2021-06-07  1:13 ` [PATCH v3 6/7] memory: make global_dirty_log a bitmask huangy81
2021-06-07 17:47   ` Peter Xu
2021-06-07  1:15 ` [PATCH v3 7/7] migration/dirtyrate: implement dirty-ring dirtyrate calculation huangy81
2021-06-07 18:36   ` Peter Xu
2021-06-11 14:05     ` Hyman Huang
2021-06-11 15:15       ` Peter Xu
2021-06-09 18:17   ` Peter Xu
2021-06-11 13:15     ` Hyman Huang
2021-06-07  1:24 ` [PATCH v3 0/7] support dirtyrate at the granualrity of vcpu Hyman
2021-06-09 14:12 ` no-reply

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=YL4/U2Kjojyr2wcT@t490s \
    --to=peterx@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=huangy81@chinatelecom.cn \
    --cc=pbonzini@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 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).