From: Avi Kivity <avi@redhat.com>
To: Andrea Arcangeli <aarcange@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC 1/2] pci-dma-api-v1
Date: Sun, 30 Nov 2008 22:27:22 +0200 [thread overview]
Message-ID: <4932F72A.10201@redhat.com> (raw)
In-Reply-To: <20081130172924.GB32172@random.random>
Andrea Arcangeli wrote:
> On Sat, Nov 29, 2008 at 09:48:22PM +0200, Avi Kivity wrote:
>
>> Since Andrea's patches contain emulation for aio readv/writev, the
>> performance degradation will not occur (though we will not see the benefit
>> either).
>>
>
> It will not occur especially if you #define DEBUG_BOUNCE. The way I
> emulated bdrv_aio_readv/writev didn't involve a bounce, but it's
> serially submitting the I/O so that it truly runs zerocopy when
> DEBUG_BOUNCE is not defined ;).
>
> IF you enable DEBUG_BOUNCE then the bounce layer will be forced on,
> and the iovec will be linearized and the DMA command executed on the
> hardware will be allowed to be as large as MAX_DMA_BOUNCE_BUFFER like
> before. So until we have a real bdrv_aio_readv/writev #defining
> DEBUG_BOUNCE is a must with cache=off.
>
>
Oh okay. In that case it should be committed with DEBUG_BOUNCE enabled,
and that removed when we have proper aio *v.
>> I doubt you can get measure malloc overhead with anything less a thousand
>> disks (even there, other overheads are likely to drown that malloc).
>>
>
> I also eliminated any sign of malloc in the direct path with a small
> cache layer that caches as many pci dma sg params (with the max iovcnt
> seen so far embedded into it) as the max number of simultaneous
> in-flight I/O seen for the whole runtime. With a max param of 10 (so
> only if there are more than 10 simultaneous sg dma I/O operations in
> flight, malloc will have to run). Only params with iov arrays with a
> iovcnt < 2048 are cached. So worst case ram waste is limited, and it's
> auto-tuning at runtime to remain near zero for single disk setups etc..
>
Overkill IMO (glibc likely caches mallocs), but can't hurt.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
next prev parent reply other threads:[~2008-11-30 20:27 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-27 12:35 [Qemu-devel] [RFC 1/2] pci-dma-api-v1 Andrea Arcangeli
2008-11-27 12:43 ` [Qemu-devel] [RFC 2/2] bdrv_aio_readv/writev_em Andrea Arcangeli
2008-11-28 11:09 ` Jamie Lokier
2008-11-27 19:14 ` [Qemu-devel] [RFC 1/2] pci-dma-api-v1 Blue Swirl
2008-11-28 1:56 ` Andrea Arcangeli
2008-11-28 17:59 ` Blue Swirl
2008-11-28 18:50 ` Andrea Arcangeli
2008-11-28 19:03 ` Blue Swirl
2008-11-28 19:18 ` Jamie Lokier
2008-11-29 19:49 ` Avi Kivity
2008-11-30 17:20 ` Andrea Arcangeli
2008-11-30 22:31 ` Anthony Liguori
2008-11-30 18:04 ` Andrea Arcangeli
2008-11-30 17:41 ` [Qemu-devel] [RFC 1/1] pci-dma-api-v2 Andrea Arcangeli
2008-11-30 18:36 ` [Qemu-devel] " Blue Swirl
2008-11-30 19:04 ` Andrea Arcangeli
2008-11-30 19:11 ` Blue Swirl
2008-11-30 19:20 ` Andrea Arcangeli
2008-11-30 21:36 ` Blue Swirl
2008-11-30 22:54 ` Anthony Liguori
2008-11-30 22:50 ` [Qemu-devel] " Anthony Liguori
2008-12-01 9:41 ` Avi Kivity
2008-12-01 16:37 ` Anthony Liguori
2008-12-02 9:45 ` Avi Kivity
2008-11-30 22:38 ` [Qemu-devel] [RFC 1/2] pci-dma-api-v1 Anthony Liguori
2008-11-30 22:51 ` Jamie Lokier
2008-11-30 22:34 ` Anthony Liguori
2008-11-29 19:48 ` Avi Kivity
2008-11-30 17:29 ` Andrea Arcangeli
2008-11-30 20:27 ` Avi Kivity [this message]
2008-11-30 22:33 ` Andrea Arcangeli
2008-11-30 22:33 ` Anthony Liguori
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=4932F72A.10201@redhat.com \
--to=avi@redhat.com \
--cc=aarcange@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).