public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Battersby <tonyb@cybernetics.com>
To: linuxraid@amcc.com, linux-scsi@vger.kernel.org
Subject: [PATCH] 3w-9xxx: fix abysmal write performance on some motherboards
Date: Fri, 09 Nov 2007 13:04:35 -0500	[thread overview]
Message-ID: <4734A133.8090207@cybernetics.com> (raw)

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.

Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
---
--- linux-2.6.24-rc2/drivers/scsi/3w-9xxx.c.orig	2007-11-09 12:32:32.000000000 -0500
+++ linux-2.6.24-rc2/drivers/scsi/3w-9xxx.c	2007-11-09 12:33:20.000000000 -0500
@@ -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))



             reply	other threads:[~2007-11-09 18:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-09 18:04 Tony Battersby [this message]
2007-11-09 18:10 ` [PATCH] 3w-9xxx: fix abysmal write performance on some motherboards adam radford

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=4734A133.8090207@cybernetics.com \
    --to=tonyb@cybernetics.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linuxraid@amcc.com \
    /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