All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Li, ZhenHua" <zhen-hual@hp.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: qemu-devel@nongnu.org
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	[thread overview]
Message-ID: <5332A3C9.80406@hp.com> (raw)
In-Reply-To: <20140326092718.GA20378@stefanha-thinkpad.muc.redhat.com>

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" <zhen-hual@hp.com>
>>
>> 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 <zhen-hual@hp.com>
>> ---
>>   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	other threads:[~2014-03-26  9:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-25  8:44 [Qemu-devel] [PATCH 1/1] virtio-blk: Use a req pool instead of malloc/free Li, Zhen-Hua
2014-03-26  9:27 ` Stefan Hajnoczi
2014-03-26  9:54   ` Li, ZhenHua [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-03-26  2:02 Li, Zhen-Hua
2014-03-26  2:07 ` Li, ZhenHua
2014-03-26  9:55 ` Paolo Bonzini
2014-03-26  9:59   ` Li, ZhenHua
2014-03-26 10:26     ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5332A3C9.80406@hp.com \
    --to=zhen-hual@hp.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.