]> git.hungrycats.org Git - linux/commitdiff
ia64: Turn BIO-level virtual merging off again, so we can turn I/O MMU
authorDavid Mosberger <davidm@tiger.hpl.hp.com>
Fri, 25 Jul 2003 11:44:18 +0000 (04:44 -0700)
committerDavid Mosberger <davidm@tiger.hpl.hp.com>
Fri, 25 Jul 2003 11:44:18 +0000 (04:44 -0700)
bypassing on again, which is more beneficial, performance-wise.

arch/ia64/hp/common/sba_iommu.c
include/asm-ia64/io.h

index 85db8f8eb1bdd45d4cf3b8e69075cde05f5755cd..fc9b8deaac55b1aadba758a1bb6bb59bc30b77d2 100644 (file)
 ** This option allows cards capable of 64bit DMA to bypass the IOMMU.  If
 ** not defined, all DMA will be 32bit and go through the TLB.
 ** There's potentially a conflict in the bio merge code with us
-** advertising an iommu, but then bypassing it.  Disabled for now.
+** advertising an iommu, but then bypassing it.  Since I/O MMU bypassing
+** appears to give more performance than bio-level virtual merging, we'll
+** do the former for now.
 */
-#undef ALLOW_IOV_BYPASS
+#define ALLOW_IOV_BYPASS
 
 /*
 ** If a device prefetches beyond the end of a valid pdir entry, it will cause
index cc2f3d6803c3734364d67d3b9013735ffca9e89a..2ff2d00ef3ed11acf17900a6073b5468723a31fd 100644 (file)
@@ -413,6 +413,16 @@ extern void __ia64_memset_c_io (unsigned long, unsigned long, long);
 
 # endif /* __KERNEL__ */
 
+/*
+ * Enabling BIO_VMERGE_BOUNDARY forces us to turn off I/O MMU bypassing.  It is said that
+ * BIO-level virtual merging can give up to 4% performance boost (not verified for ia64).
+ * On the other hand, we know that I/O MMU bypassing gives ~8% performance improvement on
+ * SPECweb-like workloads on zx1-based machines.  Thus, for now we favor I/O MMU bypassing
+ * over BIO-level virtual merging.
+ */
+#if 1
+#define BIO_VMERGE_BOUNDARY    0
+#else
 /*
  * It makes no sense at all to have this BIO_VMERGE_BOUNDARY macro here.  Should be
  * replaced by dma_merge_mask() or something of that sort.  Note: the only way
@@ -425,5 +435,6 @@ extern void __ia64_memset_c_io (unsigned long, unsigned long, long);
  */
 extern unsigned long ia64_max_iommu_merge_mask;
 #define BIO_VMERGE_BOUNDARY    (ia64_max_iommu_merge_mask + 1)
+#endif
 
 #endif /* _ASM_IA64_IO_H */