qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Hyman Huang <huangy81@chinatelecom.cn>
To: Peter Xu <peterx@redhat.com>
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: Tue, 8 Jun 2021 00:16:03 +0800	[thread overview]
Message-ID: <5ce0a796-f261-6a13-1dc9-27bc52ba033d@chinatelecom.cn> (raw)
In-Reply-To: <YL4/U2Kjojyr2wcT@t490s>



在 2021/6/7 23:46, Peter Xu 写道:
> 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.
i'll change 'sample-pages' to '*sample-pages' in the first commit 
"migration/dirtyrate: make sample page count configurable" so that the 
following patch won't touch existing exported field.
> 
>>   
>>   ##
>>   # @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.
indeed, the last version ignore this advice, i'll introduce the 
"per-vcpu" in the last patch, before it implemented.
> 
> 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"?
i prefer the "*mode" parameter to show the different dirty rate method.
> 
> 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?
uh, actually this idea is what i'm working on to stat the memory 
heat(trying to reduce the transferred memory in migration), 
theoretically it can be used for dirty rate measurement also, maybe i 
could try it after this patchset work having done.
> 

-- 
Best regard

Hyman Huang(黄勇)


  reply	other threads:[~2021-06-07 16:18 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
2021-06-07 16:16     ` Hyman Huang [this message]
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=5ce0a796-f261-6a13-1dc9-27bc52ba033d@chinatelecom.cn \
    --to=huangy81@chinatelecom.cn \
    --cc=dgilbert@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=pbonzini@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 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).