public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ravikiran G Thirumalai <kiran@scalex86.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Andi Kleen <ak@suse.de>,
	"Shai Fultheim (Shai@scalex86.org)" <shai@scalex86.org>
Subject: [was Re: Linux 2.6.14 ] Revert "x86-64: Avoid unnecessary double bouncing for swiotlb"
Date: Fri, 28 Oct 2005 15:58:12 -0700	[thread overview]
Message-ID: <20051028225812.GA6744@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.64.0510271717190.4664@g5.osdl.org>

On Thu, Oct 27, 2005 at 05:28:50PM -0700, Linus Torvalds wrote:
> 
>       Revert "x86-64: Avoid unnecessary double bouncing for swiotlb"

(http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=79b95a454bb5c1d9b7287d1016a70885ba3f346c)

Well, Andi's patch here wasn't just a small optimization as the changelog 
suggests. It helped EM64T boxes a great deal.  Just to make sure, I 
reran 2.6.14 with the attached patch and got about 45% better performance 
with iozone Initial write.  This was on a 2 cpu 4 thread SMP Xeon with 8G ram,
with 2 processes performing io to 4G files on a IDE drive.  
Maybe it wouldn't have caused breakage on some AMD boxes if the following
additional check for swiotlb was added.  Can this go into 2.6.15 please?

Thanks,
Kiran

Originally by Andi Kleen.  Patch prevents the block layer from bouncing if 
a hard or soft iommu is present.

Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>

Index: linux-2.6.14/include/asm-x86_64/pci.h
===================================================================
--- linux-2.6.14.orig/include/asm-x86_64/pci.h	2005-10-27 17:02:08.000000000 -0700
+++ linux-2.6.14/include/asm-x86_64/pci.h	2005-10-27 21:42:41.000000000 -0700
@@ -51,9 +51,9 @@
  * this boolean for bounce buffer decisions
  *
  * On AMD64 it mostly equals, but we set it to zero to tell some subsystems
- * that an IOMMU is available.
+ * that a hard or soft IOMMU is available.
  */
-#define PCI_DMA_BUS_IS_PHYS	(no_iommu ? 1 : 0)
+#define PCI_DMA_BUS_IS_PHYS	((no_iommu && !swiotlb) ? 1 : 0)
 
 /*
  * x86-64 always supports DAC, but sometimes it is useful to force

  parent reply	other threads:[~2005-10-28 22:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-28  0:28 Linux 2.6.14 Linus Torvalds
2005-10-28  4:36 ` Nigel Cunningham
2005-10-28  5:00   ` Linus Torvalds
2005-10-28 16:49 ` [PATCH] ext3: Fix warning without quota support (was: Linux 2.6.14) Jean Delvare
2005-10-28 22:58 ` Ravikiran G Thirumalai [this message]
2005-10-29 10:14   ` [was Re: Linux 2.6.14 ] Revert "x86-64: Avoid unnecessary double bouncing for swiotlb" Andi Kleen
2005-10-31 21:48     ` Ravikiran G Thirumalai
2005-11-03 18:35       ` Andi Kleen
2005-11-03 21:07         ` Muli Ben-Yehuda
2005-10-30  7:36 ` Linux 2.6.14 ehci-hcd hangs machine Borislav Petkov
2005-11-10 21:48 ` Linux 2.6.14: Badness in as-iosched Brice Goglin
2005-11-21 14:54   ` Jens Axboe
2005-11-21 15:36     ` Brice Goglin
2005-11-21 15:39       ` Jens Axboe

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=20051028225812.GA6744@localhost.localdomain \
    --to=kiran@scalex86.org \
    --cc=ak@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shai@scalex86.org \
    --cc=torvalds@osdl.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