mirror_qemu/include
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
..
block block: Fix error handling in bdrv_replace_in_backing_chain() 2017-03-07 14:53:28 +01:00
crypto crypto: add CTR mode support 2016-10-19 10:09:24 +01:00
disas Fix Thumb-1 BE32 execution and disassembly. 2017-02-07 18:29:59 +00:00
exec Change the method to calculate dirty-pages-rate 2017-03-16 08:55:56 +01:00
fpu softfloat: Add float128_to_uint32_round_to_zero() 2017-02-22 11:28:28 +11:00
hw pci: introduce a bus master container 2017-03-15 19:37:19 +02:00
io io: make qio_channel_yield aware of AioContexts 2017-02-21 11:14:07 +00:00
libdecnumber Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
migration postcopy: Use temporary for placing zero huge pages 2017-02-28 11:30:23 +00:00
monitor qmp: Dumb down how we run QMP command registration 2017-03-05 09:02:10 +01:00
net eth: Extend vlan stripping functions 2017-03-06 11:46:02 +08:00
qapi qapi: New qobject_input_visitor_new_str() for convenience 2017-03-07 16:07:47 +01:00
qemu icount: process QEMU_CLOCK_VIRTUAL timers in vCPU thread 2017-03-14 13:51:34 +01:00
qom Merge branch 'icount-update' into HEAD 2017-03-03 16:39:18 +01:00
standard-headers update Linux headers to 4.11 2017-02-28 16:18:49 +00:00
sysemu cpus: define QEMUTimerListNotifyCB for QEMU system emulation 2017-03-14 13:28:29 +01:00
ui gtk-egl: add scanout_disable support 2017-02-27 16:15:29 +01:00
elf.h nios2: Add usermode binaries emulation 2017-01-24 13:10:35 -08:00
glib-compat.h glib-compat: add g_test_add_data_func_full fallback 2017-03-01 00:09:28 +04:00
qemu-common.h Update copyright year 2017-02-28 09:03:39 +03:00
qemu-io.h hmp: Request permissions in qemu-io 2017-02-28 20:47:50 +01:00
trace-tcg.h trace: get rid of generated-events.h/generated-events.c 2016-10-12 09:54:52 +02:00