From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=41523 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PfAlS-0006Bx-A7 for qemu-devel@nongnu.org; Tue, 18 Jan 2011 07:34:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PfAlQ-0005JG-2j for qemu-devel@nongnu.org; Tue, 18 Jan 2011 07:34:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:10570) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PfAlP-0005J6-S3 for qemu-devel@nongnu.org; Tue, 18 Jan 2011 07:34:20 -0500 Message-ID: <4D358920.1060102@redhat.com> Date: Tue, 18 Jan 2011 13:35:44 +0100 From: Kevin Wolf MIME-Version: 1.0 References: <1292879604-22268-1-git-send-email-agraf@suse.de> <1292879604-22268-5-git-send-email-agraf@suse.de> In-Reply-To: <1292879604-22268-5-git-send-email-agraf@suse.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 4/8] ahci: use qiov instead of dma helpers List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Stefan Hajnoczi , Joerg Roedel , qemu-devel Developers , Gerd Hoffmann , Sebastian Herbszt 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 > --- > 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"? Where does the overhead in the DMA helpers come from? Can we optimize this code instead of making the device emulation less correct? Kevin