qemu-devel
[Top][All Lists]
Advanced

[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: Li, ZhenHua
Subject: Re: [Qemu-devel] [PATCH 1/1] virtio-blk: Use a req pool instead of malloc/free
Date: Wed, 26 Mar 2014 17:54:17 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

Stefan,

Thank you for your suggestions. I will try g_slice_* and give more performance testing results.

ZhenHua

On 03/26/2014 05:27 PM, Stefan Hajnoczi wrote:
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





reply via email to

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