diff options
| author | Xiao Guangrong | 2018-09-03 11:26:42 +0200 |
|---|---|---|
| committer | Dr. David Alan Gilbert | 2018-09-26 13:21:56 +0200 |
| commit | be8b02edae9aa3a64c1e76cb4067b4bbbb170448 (patch) | |
| tree | 4a8c346a9f6f86f69467285fa4b24fd8c8089278 /linux-headers | |
| parent | migration/rdma: Fix uninitialised rdma_return_path (diff) | |
| download | qemu-be8b02edae9aa3a64c1e76cb4067b4bbbb170448.tar.gz qemu-be8b02edae9aa3a64c1e76cb4067b4bbbb170448.tar.xz qemu-be8b02edae9aa3a64c1e76cb4067b4bbbb170448.zip | |
migration: fix calculating xbzrle_counters.cache_miss_rate
As Peter pointed out:
| - xbzrle_counters.cache_miss is done in save_xbzrle_page(), so it's
| per-guest-page granularity
|
| - RAMState.iterations is done for each ram_find_and_save_block(), so
| it's per-host-page granularity
|
| An example is that when we migrate a 2M huge page in the guest, we
| will only increase the RAMState.iterations by 1 (since
| ram_find_and_save_block() will be called once), but we might increase
| xbzrle_counters.cache_miss for 2M/4K=512 times (we'll call
| save_xbzrle_page() that many times) if all the pages got cache miss.
| Then IMHO the cache miss rate will be 512/1=51200% (while it should
| actually be just 100% cache miss).
And he also suggested as xbzrle_counters.cache_miss_rate is the only
user of rs->iterations we can adapt it to count target guest page
numbers
After that, rename 'iterations' to 'target_page_count' to better reflect
its meaning
Suggested-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Xiao Guangrong <xiaoguangrong@tencent.com>
Message-Id: <20180903092644.25812-3-xiaoguangrong@tencent.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'linux-headers')
0 files changed, 0 insertions, 0 deletions
