Skip to contentSkip to conversation

3w-9xxx: fix abysmal write performance on some motherboards

PATCH In review Tony Battersby 2 participants 2 messages Nov 9, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 3w-9xxx: fix abysmal write performance on some motherboards

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.

This issue does not seem to affect the 9550SX controller, but the patch doesn't hurt it either. I haven't tested any of the other 3ware controllers.

---

drivers/scsi/3w-9xxx.c renamed from drivers/scsi/3w-9xxx.c.orig +1 -0
@@ -2010,6 +2010,7 @@ static int __devinit twa_probe(struct pc
 	}
 
 	pci_set_master(pdev);
+	pci_try_set_mwi(pdev);
 
 	if (pci_set_dma_mask(pdev, DMA_64BIT_MASK)
 	    || pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK))
maintainer
#1 lore raw
Quoted 32 lines · Tony Battersby

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.

This issue does not seem to affect the 9550SX controller, but the patch doesn't hurt it either. I haven't tested any of the other 3ware controllers.

---

drivers/scsi/3w-9xxx.c 2007-11-09 12:33:20.000000000 -0500 renamed from drivers/scsi/3w-9xxx.c.orig 2007-11-09 12:32:32.000000000 -0500 +1 -1
@@ -2010,6 +2010,7 @@ static int __devinit twa_probe(struct pc
       }
 
       pci_set_master(pdev);
+       pci_try_set_mwi(pdev);
 
       if (pci_set_dma_mask(pdev, DMA_64BIT_MASK)
           || pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK))
 
 
-
Quoted 4 lines

To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

ACK...

-Adam