From: firstname.lastname@example.org To: email@example.com Cc: Eduardo Habkost <firstname.lastname@example.org>, Juan Quintela <email@example.com>, Hyman <firstname.lastname@example.org>, "Dr. David Alan Gilbert" <email@example.com>, Peter Xu <firstname.lastname@example.org>, Chuan Zheng <email@example.com>, Paolo Bonzini <firstname.lastname@example.org> Subject: [PATCH v4 0/6] support dirtyrate at the granualrity of vcpu Date: Wed, 16 Jun 2021 09:12:26 +0800 [thread overview] Message-ID: <email@example.com> (raw) From: Hyman Huang(黄勇) <firstname.lastname@example.org> v4: - make global_dirty_log a bitmask: 1. add comments about dirty log bitmask 2. use assert statement to check validity of flags 3. add trace to log bitmask changes - introduce mode option to show what method calculation should be used, also, export mode option in the as last commmit - split cleanup and init of dirty rate stat and move it in the main thread - change the fields of DirtyPageRecord to uint64_t type so that we can calculation the increased dirty pages with the formula as Peter's advice: dirty pages = end_pages - start_pages - introduce mutex to protect dirty rate stat info - adjust order of registering thread - drop the memory free callback this version modify some code on Peter's advice, reference to: https://lore.kernel.org/qemu-devel/YL5nNYXmrqMlXF3v@t490s/ thanks again. v3: - pick up "migration/dirtyrate: make sample page count configurable" to make patchset apply master correctly v2: - rebase to "migration/dirtyrate: make sample page count configurable" - rename "vcpu" to "per_vcpu" to show the per-vcpu method - squash patch 5/6 into a single one, squash patch 1/2 also - pick up "hmp: Add "calc_dirty_rate" and "info dirty_rate" cmds" - make global_dirty_log a bitmask to make sure both migration and dirty could not intefer with each other - add memory free callback to prevent memory leaking the most different of v2 fron v1 is that we make the global_dirty_log a bitmask. the reason is dirty rate measurement may start or stop dirty logging during calculation. this conflict with migration because stop dirty log make migration leave dirty pages out then that'll be a problem. make global_dirty_log a bitmask can let both migration and dirty rate measurement work fine. introduce GLOBAL_DIRTY_MIGRATION and GLOBAL_DIRTY_DIRTY_RATE to distinguish what current dirty log aims for, migration or dirty rate. all references to global_dirty_log should be untouched because any bit set there should justify that global dirty logging is enabled. Please review, thanks ! v1: Since the Dirty Ring on QEMU part has been merged recently, how to use this feature is under consideration. In the scene of migration, it is valuable to provide a more accurante interface to track dirty memory than existing one, so that the upper layer application can make a wise decision, or whatever. More importantly, dirtyrate info at the granualrity of vcpu could provide a possibility to make migration convergent by imposing restriction on vcpu. With Dirty Ring, we can calculate dirtyrate efficiently and cheaply. The old interface implemented by sampling pages, it consumes cpu resource, and the larger guest memory size become, the more cpu resource it consumes, namely, hard to scale. New interface has no such drawback. Please review, thanks ! Best Regards ! Hyman Huang(黄勇) (6): KVM: introduce dirty_pages and kvm_dirty_ring_enabled memory: make global_dirty_log a bitmask migration/dirtyrate: introduce struct and adjust DirtyRateStat migration/dirtyrate: adjust order of registering thread migration/dirtyrate: move init step of calculation to main thread migration/dirtyrate: implement dirty-ring dirtyrate calculation accel/kvm/kvm-all.c | 7 ++ hmp-commands.hx | 7 +- include/exec/memory.h | 14 ++- include/hw/core/cpu.h | 1 + include/sysemu/kvm.h | 1 + migration/dirtyrate.c | 259 +++++++++++++++++++++++++++++++++++++++++++------ migration/dirtyrate.h | 19 +++- migration/ram.c | 8 +- migration/trace-events | 2 + qapi/migration.json | 46 ++++++++- softmmu/memory.c | 31 ++++-- softmmu/trace-events | 1 + 12 files changed, 343 insertions(+), 53 deletions(-) -- 18.104.22.168
next reply other threads:[~2021-06-16 1:13 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-06-16 1:12 huangy81 [this message] 2021-06-16 1:12 ` [PATCH v4 1/6] KVM: introduce dirty_pages and kvm_dirty_ring_enabled huangy81 2021-06-16 15:23 ` Peter Xu 2021-06-16 1:12 ` [PATCH v4 2/6] memory: make global_dirty_log a bitmask huangy81 2021-06-16 15:22 ` Peter Xu 2021-06-17 4:49 ` Hyman Huang 2021-06-16 1:12 ` [PATCH v4 3/6] migration/dirtyrate: introduce struct and adjust DirtyRateStat huangy81 2021-06-16 15:30 ` Peter Xu 2021-06-16 1:12 ` [PATCH v4 4/6] migration/dirtyrate: adjust order of registering thread huangy81 2021-06-16 15:32 ` Peter Xu 2021-06-16 1:12 ` [PATCH v4 5/6] migration/dirtyrate: move init step of calculation to main thread huangy81 2021-06-16 16:47 ` Peter Xu 2021-06-16 1:12 ` [PATCH v4 6/6] migration/dirtyrate: implement dirty-ring dirtyrate calculation huangy81 2021-06-16 16:56 ` 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 \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --subject='Re: [PATCH v4 0/6] support dirtyrate at the granualrity of vcpu' \ /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
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.