[PATCH] qemu-kvm: Speed up of the dirty-bitmap-traveling

2010-02-05 Thread OHMURA Kei
dirty-bitmap-traveling is carried out by byte size in qemu-kvm.c. But We think that dirty-bitmap-traveling by long size is faster than by byte size especially when most of memory is not dirty. Signed-off-by: OHMURA Kei --- qemu-kvm.c | 49 ++--- 1 fi

Re: [PATCH] qemu-kvm: Speed up of the dirty-bitmap-traveling

2010-02-05 Thread Jan Kiszka
OHMURA Kei wrote: > dirty-bitmap-traveling is carried out by byte size in qemu-kvm.c. > But We think that dirty-bitmap-traveling by long size is faster than by byte > size especially when most of memory is not dirty. Sounds logical - do you have numbers on the improvement? Would be great if you c

Re: [PATCH] qemu-kvm: Speed up of the dirty-bitmap-traveling

2010-02-07 Thread OHMURA Kei
> Sounds logical - do you have numbers on the improvement? Sure. The patch showed approximately 3-7 times speed up when measured with rdtsc. The test environment and detailed results are described below. --- tmp = rdtsc(); /* function of original code*/ t1 += rdtsc() - tmp; tmp = rdtsc();

Re: [PATCH] qemu-kvm: Speed up of the dirty-bitmap-traveling

2010-02-08 Thread OHMURA Kei
>> Would be great if you could provide a version for upstream as well >> because it will likely replace this qemu-kvm code on day. > O.K. We'll prepare it. We have implemented the version for upstream. Some source code are borrowed from qemu-kvm.c. It is not fully tested yet, though. We also

Re: [PATCH] qemu-kvm: Speed up of the dirty-bitmap-traveling

2010-02-08 Thread Jan Kiszka
OHMURA Kei wrote: >>> Would be great if you could provide a version for upstream as well >>> because it will likely replace this qemu-kvm code on day. >> O.K. We'll prepare it. > > > We have implemented the version for upstream. Some source code are borrowed > from qemu-kvm.c. It is not fully

Re: [PATCH] qemu-kvm: Speed up of the dirty-bitmap-traveling

2010-02-08 Thread Avi Kivity
On 02/05/2010 12:18 PM, OHMURA Kei wrote: > dirty-bitmap-traveling is carried out by byte size in qemu-kvm.c. > But We think that dirty-bitmap-traveling by long size is faster than by byte > size especially when most of memory is not dirty. > > > > + > +static int kvm_get_dirty_pages_log_range_by_l

Re: [PATCH] qemu-kvm: Speed up of the dirty-bitmap-traveling

2010-02-09 Thread OHMURA Kei
Thank you for your comments. We have implemented the code which applied your comments. This is patch for qemu-kvm.c. Signed-off-by: OHMURA Kei --- qemu-kvm.c | 31 +++ 1 files changed, 19 insertions(+), 12 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index

Re: [PATCH] qemu-kvm: Speed up of the dirty-bitmap-traveling

2010-02-09 Thread OHMURA Kei
Thank you for your comments. We have implemented the code which applied your comments. This is patch for upstream. Signed-off-by: OHMURA Kei --- kvm-all.c | 54 +++--- 1 files changed, 39 insertions(+), 15 deletions(-) diff --git a/kvm-all.c b

Re: [PATCH] qemu-kvm: Speed up of the dirty-bitmap-traveling

2010-02-09 Thread Avi Kivity
On 02/09/2010 11:54 AM, OHMURA Kei wrote: > Thank you for your comments. We have implemented the code which applied your > comments. This is patch for qemu-kvm.c. > Please reuse the changelog when reposing a patch, this makes it easier for me to apply it. > @@ -2438,27 +2438,34 @@ static in

Re: [PATCH] qemu-kvm: Speed up of the dirty-bitmap-traveling

2010-02-10 Thread OHMURA Kei
> Please reuse the changelog when reposing a patch, this makes it easier > for me to apply it. Thanks. Will follow it from next time. > Should be a host long size, not guest. This will fail when running a > 32-bit qemu-system-x86_64 binary. Sorry. That was our mistake. > Instead of using a n

Re: [PATCH] qemu-kvm: Speed up of the dirty-bitmap-traveling

2010-02-10 Thread Avi Kivity
On 02/10/2010 11:55 AM, OHMURA Kei wrote: > >> Instead of using a nested loop if bitmap_ul[i] != 0, it is possible to >> use just a single loop (while (c> 0)), and process a long's worth of data. >> >> The only trickery is with big endian hosts, where the conversion from >> bit number to page numb