[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] virtio-blk: Avoid zeroing every request structu
From: |
Alexander Graf |
Subject: |
Re: [Qemu-devel] [PATCH] virtio-blk: Avoid zeroing every request structure |
Date: |
Tue, 18 May 2010 18:31:04 +0200 |
User-agent: |
Thunderbird 2.0.0.23 (X11/20090817) |
Anthony Liguori wrote:
> On 05/18/2010 11:26 AM, Alexander Graf wrote:
>> Jes Sorensen wrote:
>>
>>> On 05/14/10 23:52, Stefan Hajnoczi wrote:
>>>
>>>
>>>> The VirtIOBlockRequest structure is about 40 KB in size. This patch
>>>> avoids zeroing every request by only initializing fields that are
>>>> read.
>>>> The other fields are either written to or may not be used at all.
>>>>
>>>> Oprofile shows about 10% of CPU samples in memset called by
>>>> virtio_blk_alloc_request(). The workload is
>>>> dd if=/dev/vda of=/dev/null iflag=direct bs=8k running concurrently 4
>>>> times. This patch makes memset disappear to the bottom of the
>>>> profile.
>>>>
>>>> Signed-off-by: Stefan Hajnoczi<address@hidden>
>>>>
>>>>
>>> Great catch!
>>>
>>> I ran some benchmarks using a ramdisk passed to the guest as a virtio
>>> device and with this patch I saw improvements ranging from 5-20%. I
>>> believe the fluctuations are due to not being able to numa bind it due
>>> to limited memory.
>>>
>>> However a win all the way round!
>>>
>>>
>> It looks like a fairly small change with a huge win. Sounds like a
>> perfect candidate for 0.12.5 to me.
>>
>
> I'd prefer to stick to bug fixes for stable releases. Performance
> improvements are a good motivation for people to upgrade to 0.13 :-)
In general I agree, but this one looks like a really simple one.
Alex
Re: [Qemu-devel] [PATCH] virtio-blk: Avoid zeroing every request structure, Corentin Chary, 2010/05/18
- Re: [Qemu-devel] [PATCH] virtio-blk: Avoid zeroing every request structure, Stefan Hajnoczi, 2010/05/18
- Re: [Qemu-devel] [PATCH] virtio-blk: Avoid zeroing every request structure, Corentin Chary, 2010/05/18
- Re: [Qemu-devel] [PATCH] virtio-blk: Avoid zeroing every request structure, Stefan Hajnoczi, 2010/05/18
- Re: [Qemu-devel] [PATCH] virtio-blk: Avoid zeroing every request structure, Stefan Hajnoczi, 2010/05/21
- [Qemu-devel] [PATCH 0/2] Tidy qemu_malloc, Richard Henderson, 2010/05/21
- Re: [Qemu-devel] [PATCH 0/2] Tidy qemu_malloc, Aurelien Jarno, 2010/05/28
- [Qemu-devel] [PATCH 2/2] linux-user: Use qemu-malloc.c., Richard Henderson, 2010/05/21
- [Qemu-devel] [PATCH 1/2] Use calloc in qemu_mallocz., Richard Henderson, 2010/05/21