All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>,
	Joerg Roedel <Joerg.Roedel@amd.com>,
	qemu-devel Developers <qemu-devel@nongnu.org>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Sebastian Herbszt <herbszt@gmx.de>
Subject: [Qemu-devel] Re: [PATCH 4/8] ahci: use qiov instead of dma helpers
Date: Tue, 18 Jan 2011 13:45:40 +0100	[thread overview]
Message-ID: <A60ACD3A-0776-4913-B94C-B52914E4370A@suse.de> (raw)
In-Reply-To: <4D358920.1060102@redhat.com>


On 18.01.2011, at 13:35, Kevin Wolf wrote:

> Am 20.12.2010 22:13, schrieb Alexander Graf:
>> The DMA helpers incur additional overhead on data transfers. I'm not
>> sure we need the additional complexity provided by them. So let's just
>> use qiovs directly when running in the fast path (ncq).
>> 
>> Signed-off-by: Alexander Graf <agraf@suse.de>
>> ---
>> hw/ide/ahci.c |  100 ++++++++++++++++++++++++++++++++++++++++++++++++++++----
>> hw/ide/ahci.h |    3 ++
>> 2 files changed, 95 insertions(+), 8 deletions(-)
> 
> I don't feel comfortable with this one, and I think a while ago we
> discussed on IRC why the DMA helpers even exist. If AHCI doesn't need
> them, probably nobody needed them.
> 
> However, I'm inclined to think that AHCI actually _does_ need them in
> corner cases, even though it might not break in all the common cases
> that you have tested. Can you explain why only AHCI doesn't need it or
> is it just "didn't break for me in practice"?
> 

It's the latter.

> Where does the overhead in the DMA helpers come from? Can we optimize
> this code instead of making the device emulation less correct?

Well, dma helpers involve another malloc which is probably the biggest hog. I frankly don't see the point in making it correct for the fast path though. I'd rather like to have a fast block emulation that works with all OSs than an accurate one that emulates something nobody cares about.

Virtio for example doesn't use dma helpers either - they just claim it's not defined in the spec. So if virtio-blk gets away with it, it means that all OSs should never make use of the additional complexity.


Alex

  reply	other threads:[~2011-01-18 12:45 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-20 21:13 [Qemu-devel] [PATCH 0/8] Some more AHCI work Alexander Graf
2010-12-20 21:13 ` [Qemu-devel] [PATCH 1/8] ahci: split ICH9 from core Alexander Graf
2010-12-23  8:23   ` Stefan Hajnoczi
2010-12-23 10:32     ` Alexander Graf
2010-12-27 11:51       ` Sebastian Herbszt
2010-12-20 21:13 ` [Qemu-devel] [PATCH 2/8] ahci: split ICH and AHCI even more Alexander Graf
2011-01-18 12:19   ` [Qemu-devel] " Kevin Wolf
2011-02-01 14:12     ` Alexander Graf
2010-12-20 21:13 ` [Qemu-devel] [PATCH 3/8] ahci: send init d2h fis on fis enable Alexander Graf
2011-01-18 12:25   ` [Qemu-devel] " Kevin Wolf
2011-01-18 12:42     ` Alexander Graf
2010-12-20 21:13 ` [Qemu-devel] [PATCH 4/8] ahci: use qiov instead of dma helpers Alexander Graf
2011-01-18 12:35   ` [Qemu-devel] " Kevin Wolf
2011-01-18 12:45     ` Alexander Graf [this message]
2011-01-18 13:14       ` Stefan Hajnoczi
2011-01-18 13:30         ` Kevin Wolf
2010-12-20 21:13 ` [Qemu-devel] [PATCH 5/8] ahci: Implement HBA reset Alexander Graf
2010-12-20 21:13 ` [Qemu-devel] [PATCH 6/8] ahci: make number of ports runtime determined Alexander Graf
2011-01-18 12:40   ` [Qemu-devel] " Kevin Wolf
2011-01-18 12:46     ` Alexander Graf
2011-01-18 13:33       ` Kevin Wolf
2011-01-18 13:09     ` Gerd Hoffmann
2010-12-20 21:13 ` [Qemu-devel] [PATCH 7/8] ahci: free dynamically allocated iovs Alexander Graf
2011-01-18 12:41   ` [Qemu-devel] " Kevin Wolf
2010-12-20 21:13 ` [Qemu-devel] [PATCH 8/8] ahci: fix !msi interrupts Alexander Graf
2011-01-17 14:37   ` [Qemu-devel] " Jan Kiszka
2011-01-17 16:00     ` Alexander Graf
2011-01-17 16:03       ` Jan Kiszka
2011-01-17 16:04         ` Alexander Graf
2011-01-17 16:20           ` Jan Kiszka
2011-01-17 16:33             ` Alexander Graf
2011-01-17 16:48               ` Jan Kiszka
2011-01-17 16:50                 ` Alexander Graf
2011-01-18  9:08               ` Gerd Hoffmann
2011-01-18 12:05                 ` Alexander Graf
2011-01-18 12:58                   ` Jan Kiszka
2011-01-22 13:13                     ` Aurelien Jarno
2011-01-22 14:14                       ` Edgar E. Iglesias
2011-01-22 14:32                         ` Alexander Graf
2011-01-22 14:40                           ` Aurelien Jarno
2011-01-23  3:34                             ` Edgar E. Iglesias
2011-01-22 14:28                       ` Alexander Graf
2011-01-22 14:34                         ` Aurelien Jarno
2011-01-18 13:02                   ` Gerd Hoffmann
2011-01-17 13:25 ` [Qemu-devel] [PATCH 0/8] Some more AHCI work Gerd Hoffmann

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=A60ACD3A-0776-4913-B94C-B52914E4370A@suse.de \
    --to=agraf@suse.de \
    --cc=Joerg.Roedel@amd.com \
    --cc=herbszt@gmx.de \
    --cc=kraxel@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@linux.vnet.ibm.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.