public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: Tejun Heo <htejun@gmail.com>
Cc: linux-pci@atrey.karlin.mff.cuni.cz, Greg KH <greg@kroah.com>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: question regarding cacheline size
Date: Thu, 7 Sep 2006 05:11:20 -0600	[thread overview]
Message-ID: <20060907111120.GL2558@parisc-linux.org> (raw)
In-Reply-To: <44FFD8C6.8080802@gmail.com>

On Thu, Sep 07, 2006 at 10:31:02AM +0200, Tejun Heo wrote:
> As the BIOS doesn't run after hotplugging cardbus card, the cache line 
> isn't configured and the controller ends up having 0 cache line size and 
> always using Read command.  When that happens, write performance drops 
> hard - the throughput is < 2Mbytes/s.
> 
> http://thread.gmane.org/gmane.linux.ide/12908/focus=12908
> 
> So, sata_sil24 driver has to program CLS if it's not already set, but 
> I'm not sure which number to punch in.  FWIW, sil3124 doesn't seem to 
> put restrictions on the values which can be used for CLS.  There are 
> several candidates...
> 
> * L1_CACHE_BYTES / 4 : this is used by init routine in yenta_socket.c. 
> It seems to be a sane default but I'm not sure whether L1 cache line 
> size always coincides with the size as seen from PCI bus.
> 
> * pci_cache_line_size in drivers/pci/pci.c : this is used for 
> pci_generic_prep_mwi() and can be overridden by arch specific code. 
> this seems more appropriate but is not exported.
> 
> For all involved commands - memory read line, memory read multiple and 
> memory write and invalidate - a value larger than actual cacheline size 
> doesn't hurt but a smaller value may.

Just call pci_set_mwi(), that'll make sure the cache line size is set
correctly.

  reply	other threads:[~2006-09-07 11:11 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-07  8:31 question regarding cacheline size Tejun Heo
2006-09-07 11:11 ` Matthew Wilcox [this message]
2006-09-07 11:20   ` Tejun Heo
2006-09-07 12:07     ` Russell King
2006-09-07 12:23       ` Matthew Wilcox
2006-09-07 12:33         ` Arjan van de Ven
2006-09-07 12:40           ` Matthew Wilcox
2006-09-07 12:53             ` Tejun Heo
2006-09-07 13:04               ` Matthew Wilcox
2006-09-07 13:19                 ` Tejun Heo
2006-09-07 15:21                   ` Grant Grundler
2006-09-07 15:47                     ` Tejun Heo
2006-09-07 16:00                       ` Jeff Garzik
2006-09-07 17:00                         ` Matthew Wilcox
2006-09-07 16:04                     ` Jeff Garzik
2006-09-22 23:47                       ` Grant Grundler
2006-09-07 13:30                 ` Jeff Garzik
2006-09-07 13:10               ` Russell King
2006-09-07 13:01             ` Arjan van de Ven
2006-09-07 13:02         ` Russell King
2006-09-07 11:59 ` linux-os (Dick Johnson)

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=20060907111120.GL2558@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=greg@kroah.com \
    --cc=htejun@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    /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