From: Christoph Hellwig <hch@lst.de>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v3 1/2] Add bdrv_aio_multiwrite
Date: Fri, 11 Sep 2009 20:36:45 +0200 [thread overview]
Message-ID: <20090911183645.GB13621@lst.de> (raw)
In-Reply-To: <4AA9EE35.9020900@redhat.com>
On Fri, Sep 11, 2009 at 08:29:09AM +0200, Kevin Wolf wrote:
> Am 11.09.2009 00:44, schrieb Christoph Hellwig:
> > One thing that concerns me here is that we keep adding more memory
> > allocations to the I/O path. At least on fast SSDs even kernel memory
> > allocations are a performance problem and they're much faster than
> > userspace ones.
>
> In the non-merging case we have one additional allocation, the one for
> mcb. Maybe we could do something like the AIOPool here to avoid some
> mallocs.
>
> In the merging case we need to allocate new IO vectors. I don't see a
> way around this, though, and I hope that the benefit of a saved write
> request outweighs the malloc costs. If not, it probably was a bad idea
> to accept your suggestion to make it generic code instead of just
> merging requests for qcow2.
Right now I'm just thinking about the potential issues. The problem
is that the trade offs maybe be very different for different scenarios.
For a normal disk which is by far the most common option (and will be
for a long time) the merging is a clear benefit. For SSDs we might have
to do different optimizations. If it's not a big issue avoiding too
many memory allocations and rather doing fewer larger ones is in general
a good thing, though.
next prev parent reply other threads:[~2009-09-11 18:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-09 15:53 [Qemu-devel] [PATCH v3 0/2] block: Handle multiple write requests at once Kevin Wolf
2009-09-09 15:53 ` [Qemu-devel] [PATCH v3 1/2] Add bdrv_aio_multiwrite Kevin Wolf
[not found] ` <m3ocpj67ip.fsf@neno.mitica>
2009-09-10 7:07 ` [Qemu-devel] " Kevin Wolf
2009-09-10 22:44 ` [Qemu-devel] " Christoph Hellwig
2009-09-11 6:29 ` Kevin Wolf
2009-09-11 18:36 ` Christoph Hellwig [this message]
2009-09-09 15:53 ` [Qemu-devel] [PATCH v3 2/2] virtio-blk: Use bdrv_aio_multiwrite Kevin Wolf
2009-09-10 22:41 ` Christoph Hellwig
2009-09-11 7:10 ` Kevin Wolf
2009-09-11 18:39 ` Christoph Hellwig
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=20090911183645.GB13621@lst.de \
--to=hch@lst.de \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).