[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/1] virtio-blk: Use a req pool instead of mallo
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH 1/1] virtio-blk: Use a req pool instead of malloc/free |
Date: |
Wed, 26 Mar 2014 10:27:18 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Tue, Mar 25, 2014 at 04:44:48PM +0800, Li, Zhen-Hua wrote:
> From: "Li, ZhenHua" <address@hidden>
>
> In virtio-blk module, when there is new request, new req structure
> will be created by malloc. Use a req pool instead of this, will increase
> performance;
>
> Increacement: about 5% to 10%.
>
> Signed-off-by: Li, ZhenHua <address@hidden>
> ---
> hw/block/virtio-blk.c | 87
> ++++++++++++++++++++++++++++++++++++++++++-------
> 1 file changed, 75 insertions(+), 12 deletions(-)
Please try g_slice_new() instead of implementing a request pool
manually:
https://developer.gnome.org/glib/unstable/glib-Memory-Slices.html
We already use g_slice_new() in other places in QEMU - for example in
the virtio-blk dataplane code.
Also please provide more details about the benchmark you are running.
Which benchmark, what workload/settings, 5-10% increase of which number
(IOPS, BW/CPU%, or something else), etc.
Stefan