qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] virtio-blk: Avoid zeroing every request struct


From: Corentin Chary
Subject: Re: [Qemu-devel] [PATCH] virtio-blk: Avoid zeroing every request structure
Date: Tue, 18 May 2010 21:55:28 +0200

On Tue, May 18, 2010 at 9:02 PM, Stefan Hajnoczi <address@hidden> wrote:
> On Tue, May 18, 2010 at 5:37 PM, Corentin Chary
> <address@hidden> wrote:
>> Did you try to profile using calloc in qemu_mallocz instead of malloc + 
>> memset ?
>
> No, I didn't try it.  I don't see how it could perform on par with not
> clearing memory at all.  Something is going to have to clear that
> memory when using memset() or calloc().  Either libc or the kernel (if
> using mmap).

I believe that if the allocation size is large enougth, getting a
zeroed page can be almost free with clever memory management.
Could you try to re-run your test with calloc and see what it does ?
Speeding up all mallocz calls is probably a good idea :)
-- 
Corentin Chary
http://xf.iksaif.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]