public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* pci_set_mwi() ... why isn't it used more?
@ 2003-01-20 18:41 David Brownell
  2003-01-20 19:00 ` Jeff Garzik
  0 siblings, 1 reply; 10+ messages in thread
From: David Brownell @ 2003-01-20 18:41 UTC (permalink / raw)
  To: linux-kernel

I was looking at some new hardware and noticed that it's
got explicit support for the PCI Memory Write and Invalidate
command ... enabled (in part) under Linux by pci_set_mwi().

However, very few Linux drivers use that routine.  Given
that it can lead to improved performance, and that devices
don't have to implement that enable bit, I'm curious what
the story is...

  - Just laziness or lack-of-education on the part of
    driver writers?

  - Iffy upport in motherboard chipsets or CPUs?  If so,
    which ones?

  - Flakey support in PCI devices, so that enabling it
    leads to trouble?

  - Something else?

  - Combination of all the above?

Briefly, MWI can avoid some cache flushes, thereby reducing
memory bus contention.  It can also enable longer PCI bursts
(since the dma master won't stop writing mid-cacheline).

And calling pci_set_mwi() makes sure that the device knows
the correct cache line size, which can make Memory Read
Multiple (and Memory Read Line) commands work better (also
with longer PCI bursts) by hinting to bridges when prefetch
would be a Fine Thing ... likewise reducing memory bus
contention.  Those benefits can happen even if the hardware
doesn't support MWI; on my systems I noticed that the
cacheline size is always set too small by default, which
seems like a PCI initialization bug.

So what's the story ... is there some reason Linux isn't
trying to enable such PCI features more often?  And why
it doesn't set the cacheline size correctly by default?

- Dave


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-01-31  0:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-20 18:41 pci_set_mwi() ... why isn't it used more? David Brownell
2003-01-20 19:00 ` Jeff Garzik
2003-01-20 19:37   ` David Brownell
2003-01-30 13:52     ` Anton Blanchard
2003-01-30 16:25       ` David Brownell
2003-01-30 16:59         ` Ivan Kokshaysky
2003-01-30 18:35           ` David Brownell
2003-01-30 23:34             ` Ivan Kokshaysky
2003-01-31  0:11               ` Jeff Garzik
2003-01-31  0:51               ` David Brownell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox