Re: [Qemu-devel] [PATCH] CPU consumption optimization of 'qemu-img convert' using bdrv_is_allocated()

2011-06-16 Thread Dmitry Konishchev
thing to do, so I believe that the second version of the patch is good enough. -- Dmitry Konishchev mailto:konishc...@gmail.com

Re: [Qemu-devel] [PATCH] CPU consumption optimization of 'qemu-img convert' using bdrv_is_allocated()

2011-06-15 Thread Dmitry Konishchev
(Dmitry Konishchev) mailto:konishc...@gmail.com

Re: [Qemu-devel] [PATCH] CPU consumption optimization of 'qemu-img convert' using bdrv_is_allocated()

2011-06-15 Thread Dmitry Konishchev
On Wed, Jun 15, 2011 at 12:39 PM, Stefan Hajnoczi stefa...@gmail.com wrote: Why is bdrv_get_geometry() slow? Mmm.. Frankly, I haven't looked so deep, but it is going to be slow at least for raw images due to using lseek(). -- Dmitry Konishchev mailto:konishc...@gmail.com

[Qemu-devel] [PATCH] CPU consumption optimization of 'qemu-img convert' using bdrv_is_allocated()

2011-06-15 Thread Dmitry Konishchev
Signed-off-by: Dmitry Konishchev konishc...@gmail.com --- qemu-img.c | 184 ++- 1 files changed, 143 insertions(+), 41 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 4f162d1..7f3d853 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -27,6

Re: [Qemu-devel] [PATCH] CPU consumption optimization of 'qemu-img convert' using bdrv_is_allocated()

2011-06-15 Thread Dmitry Konishchev
lseek() in block/raw-posix.c... May be I'am mistaken about lseek(), but I get 9% slower version if disable caching. -- Дмитрий Конищев (Dmitry Konishchev) mailto:konishc...@gmail.com

Re: [Qemu-devel] [PATCH] CPU consumption optimization of 'qemu-img convert' using bdrv_is_allocated()

2011-06-15 Thread Dmitry Konishchev
On Wed, Jun 15, 2011 at 5:33 PM, Stefan Hajnoczi stefa...@gmail.com wrote: disable caching? Image geometry caching. I meant If I call bdrv_get_geometry() every time I need image geometry instead of obtaining it from bs_geometry variable. -- Дмитрий Конищев (Dmitry Konishchev) mailto:konishc

Re: [Qemu-devel] [PATCH] CPU consumption optimization of 'qemu-img convert' using bdrv_is_allocated()

2011-06-14 Thread Dmitry Konishchev
On Mon, Jun 13, 2011 at 1:13 PM, Dmitry Konishchev konishc...@gmail.com wrote: I haven't done this because in this case I have to pass too lot of local variables to this function. Just not sure that it'll look better. But if you mind I surely can do this. Should I? -- Dmitry Konishchev

Re: [Qemu-devel] [PATCH] CPU consumption optimization of 'qemu-img convert' using bdrv_is_allocated()

2011-06-13 Thread Dmitry Konishchev
I surely can do this. -- Dmitry Konishchev mailto:konishc...@gmail.com

[Qemu-devel] [PATCH] CPU consumption optimization of 'qemu-img convert' using bdrv_is_allocated()

2011-06-08 Thread Dmitry Konishchev
Signed-off-by: Dmitry Konishchev konishc...@gmail.com --- qemu-img.c | 168 +--- 1 files changed, 127 insertions(+), 41 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 4f162d1..9d905ed 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -38,6

Re: [Qemu-devel] [PATCH] [qemu-img] CPU consuming optimization

2011-05-18 Thread Dmitry Konishchev
an enchancement for it with bdrv_is_allocated() because it is going to include this patch. -- Dmitry Konishchev mailto:konishc...@gmail.com

Re: [Qemu-devel] [PATCH] [qemu-img] CPU consuming optimization

2011-05-18 Thread Dmitry Konishchev
sure that the conversion falls back to a simple is_not_zero() when a backing file is used. Thanks, I'll take this into account. Signed-off-by: Dmitry Konishchev konishc...@gmail.com --- qemu-img.c | 30 +++--- 1 files changed, 27 insertions(+), 3 deletions(-) diff

Re: [Qemu-devel] [PATCH] [qemu-img] CPU consuming optimization

2011-05-18 Thread Dmitry Konishchev
) return 1; Coding style requires braces here. } + return 0; } OK, fixed. Signed-off-by: Dmitry Konishchev konishc...@gmail.com --- qemu-img.c | 29 ++--- 1 files changed, 26 insertions(+), 3 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index

Re: [Qemu-devel] [PATCH] [qemu-img] CPU consuming optimization

2011-05-18 Thread Dmitry Konishchev
to understand that, in the place where the function is inlined, it is always called with len == 512 and optimize the code for this case by automatically unroll the loop and so on. But in the bottom line I don't really mind to include the assert - just believe that it's not really worth it. -- Dmitry

[Qemu-devel] [PATCH] is_not_zero() optimization in qemu-img

2011-05-18 Thread Dmitry Konishchev
Please sorry - I've sent the previous email via Thunderbird which promised that won't wrap the lines but it did. :( Sending this via git send-email. Signed-off-by: Dmitry Konishchev konishc...@gmail.com --- qemu-img.c | 29 ++--- 1 files changed, 26 insertions(+), 3

[Qemu-devel] [PATCH] [qemu-img] CPU consuming optimization

2011-05-17 Thread Dmitry Konishchev
1m6.898s user 0m16.021s sys 0m6.700s Please, see on the consumed user CPU time. I think that the optimization worth it, so it will be awesome if you accept this patch (see the attachment). Thanks for your attention. From 61d228c0ea0d518de48a08577cd6d282e2f97759 Mon Sep 17 00:00:00 2001 From: Dmitry

[Qemu-devel] [PATCH] Few new QMP features

2011-03-22 Thread Dmitry Konishchev
if you include this patches to the upstream (I've attached them to this message). -- Dmitry Konishchev mailto:konishc...@gmail.com From f7e7119fecbce280e7ee45364260fb6e4d58d49a Mon Sep 17 00:00:00 2001 From: Dmitry Konishchev konishc...@gmail.com Date: Wed, 16 Mar 2011 12:26:09 +0300 Subject