Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > fc11cd6e1c513a17304da94a5390f3cd > files > 3387

kernel-2.6.18-194.11.1.el5.src.rpm

From: Tomas Henzl <thenzl@redhat.com>
Date: Fri, 13 Jun 2008 12:04:28 +0200
Subject: [scsi] fix high I/O wait using 3w-9xxx
Message-id: 4852462C.7090606@redhat.com
O-Subject: [RHEL5.3 PATCH] bz444759: fix high I/O wait using 3w-9xxx
Bugzilla: 444759
RH-Acked-by: Alan Cox <alan@redhat.com>
RH-Acked-by: Prarit Bhargava <prarit@redhat.com>
RH-Acked-by: John Feeney <jfeeney@redhat.com>

Hi.

Attached is a patch to address bz444759: "high I/O wait using 3w-9xxx"

It is upstream - 1e6c38cec08f88b0df88a34e80f15492cace74e9
Upstream comment:
    The 3ware 9500S-8 SATA RAID controller exhibits terrible write
    performance when PCI memory-write-and-invalidate is disabled.  This is
    easy to demonstrate by replacing pci_try_set_mwi() in the patch below
    with pci_clear_mwi().  My benchmarks show the following:

    MWI disabled: 15 MB/s write, 330 MB/s read
    MWI enabled:  240 MB/s write, 330 MB/s read
    Most motherboards will enable MWI without the driver having to set it
    explicitly, so most people probably wouldn't encounter this problem.
    For the few motherboards that don't enable it, this patch could give a
    16x performance improvement for writing.

It compiles - http://brewweb.devel.redhat.com/brew/taskinfo?taskID=1344540

The reporter verified that the patched kernel resolves his problem.

Tomas

diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c
index f29fec3..e4d4e0b 100644
--- a/drivers/scsi/3w-9xxx.c
+++ b/drivers/scsi/3w-9xxx.c
@@ -89,6 +89,7 @@
 #include <scsi/scsi_host.h>
 #include <scsi/scsi_tcq.h>
 #include <scsi/scsi_cmnd.h>
+#include <linux/libata.h>
 #include "3w-9xxx.h"
 
 /* Globals */
@@ -2062,6 +2063,7 @@ static int __devinit twa_probe(struct pci_dev *pdev, const struct pci_device_id
 	}
 
 	pci_set_master(pdev);
+	pci_try_set_mwi(pdev);
 
 	retval = pci_set_dma_mask(pdev, sizeof(dma_addr_t) > 4 ? DMA_64BIT_MASK : DMA_32BIT_MASK);
 	if (retval) {