]> git.proxmox.com Git - mirror_qemu.git/commit - softmmu/memory.c
memory: make global_dirty_tracking a bitmask
authorHyman Huang(黄勇) <huangy81@chinatelecom.cn>
Tue, 29 Jun 2021 16:01:19 +0000 (16:01 +0000)
committerJuan Quintela <quintela@redhat.com>
Mon, 1 Nov 2021 21:56:43 +0000 (22:56 +0100)
commit63b41db4bc776e71384d14d68a8ec6e0aae5ea3a
tree8d3b98aaf502edc40bfaeed25fb278561042596c
parent7786ae40ba4e7d5b9ebbfd07924f4379e218c6ef
memory: make global_dirty_tracking a bitmask

since dirty ring has been introduced, there are two methods
to track dirty pages of vm. it seems that "logging" has
a hint on the method, so rename the global_dirty_log to
global_dirty_tracking would make description more accurate.

dirty rate measurement may start or stop dirty tracking during
calculation. this conflict with migration because stop dirty
tracking make migration leave dirty pages out then that'll be
a problem.

make global_dirty_tracking 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
tracking aims for, migration or dirty rate.

Signed-off-by: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>
Message-Id: <9c9388657cfa0301bd2c1cfa36e7cf6da4aeca19.1624040308.git.huangy81@chinatelecom.cn>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
hw/i386/xen/xen-hvm.c
include/exec/memory.h
include/exec/ram_addr.h
migration/ram.c
softmmu/memory.c
softmmu/trace-events