Re: [Qemu-devel] [PATCH v2] Change the method to calculate dirty-pages-rate

2017-03-16 Thread Juan Quintela
Chao Fan wrote: > 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;

Re: [Qemu-devel] [PATCH v2] Change the method to calculate dirty-pages-rate

2017-03-15 Thread Juan Quintela
Chao Fan wrote: > 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;

Re: [Qemu-devel] [PATCH v2] Change the method to calculate dirty-pages-rate

2017-03-14 Thread Chao Fan
On Tue, Mar 14, 2017 at 09:38:46AM +0100, Juan Quintela wrote: >Chao Fan wrote: >> 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; >>

Re: [Qemu-devel] [PATCH v2] Change the method to calculate dirty-pages-rate

2017-03-14 Thread Juan Quintela
Chao Fan wrote: > 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;

Re: [Qemu-devel] [PATCH v2] Change the method to calculate dirty-pages-rate

2017-03-14 Thread Juan Quintela
Chao Fan wrote: > 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;

[Qemu-devel] [PATCH v2] Change the method to calculate dirty-pages-rate

2017-03-13 Thread Chao Fan
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)