qemu-irix/include/exec
Chao Fan 1ffb5dfd35 Change the method to calculate dirty-pages-rate
In function cpu_physical_memory_sync_dirty_bitmap, file
include/exec/ram_addr.h:

if (src[idx][offset]) {
    unsigned long bits = atomic_xchg(&src[idx][offset], 0);
    unsigned long new_dirty;
    new_dirty = ~dest[k];
    dest[k] |= bits;
    new_dirty &= bits;
    num_dirty += ctpopl(new_dirty);
}

After these codes executed, only the pages not dirtied in bitmap(dest),
but dirtied in dirty_memory[DIRTY_MEMORY_MIGRATION] will be calculated.
For example:
When ram_list.dirty_memory[DIRTY_MEMORY_MIGRATION] = 0b00001111,
and atomic_rcu_read(&migration_bitmap_rcu)->bmap = 0b00000011,
the new_dirty will be 0b00001100, and this function will return 2 but not
4 which is expected.
the dirty pages in dirty_memory[DIRTY_MEMORY_MIGRATION] are all new,
so these should be calculated also.

Signed-off-by: Chao Fan <fanc.fnst@cn.fujitsu.com>
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
2017-03-16 08:55:56 +01:00
..
user linux-user: Use correct alignment for long long on i386 guests 2016-08-04 16:34:59 +03:00
address-spaces.h
cpu-all.h exec: introduce MemoryRegionCache 2016-12-22 16:00:23 +01:00
cpu-common.h memory: Introduce DEVICE_HOST_ENDIAN for ram device 2017-03-03 16:40:03 +01:00
cpu-defs.h
cpu_ldst.h cpu_ldst.h: use correct guest address parameter 2016-11-22 23:26:51 +01:00
cpu_ldst_template.h trace: switch to modular code generation for sub-directories 2017-01-31 17:11:18 +00:00
cpu_ldst_useronly_template.h trace: switch to modular code generation for sub-directories 2017-01-31 17:11:18 +00:00
cputlb.h cputlb: atomically update tlb fields used by tlb_reset_dirty 2017-02-24 10:32:46 +00:00
exec-all.h cputlb: introduce tlb_flush_*_all_cpus[_synced] 2017-02-24 10:32:46 +00:00
gdbstub.h
gen-icount.h cpu-exec: unify icount_decr and tcg_exit_req 2017-02-22 14:56:34 +01:00
helper-gen.h
helper-head.h
helper-proto.h
helper-tcg.h
hwaddr.h
ioport.h
log.h
memattrs.h
memory-internal.h
memory.h memory_region: Fix name comments 2017-03-14 13:26:36 +01:00
poison.h
ram_addr.h Change the method to calculate dirty-pages-rate 2017-03-16 08:55:56 +01:00
ramlist.h ramblock-notifier: new 2017-01-16 17:52:35 +01:00
semihost.h
softmmu-semi.h
tb-context.h tcg: Make tb_flush() thread safe 2016-09-27 11:57:30 +02:00
tb-hash-xx.h
tb-hash.h