linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] Relaxed PIO read vs. DMA write ordering
@ 2004-01-07 17:58 Jesse Barnes
  2004-01-07 19:02 ` Matthew Wilcox
  0 siblings, 1 reply; 25+ messages in thread
From: Jesse Barnes @ 2004-01-07 17:58 UTC (permalink / raw)
  To: linux-pci, linux-kernel; +Cc: jeremy

I've already talked with Grant a little about this, but I'm having
second thoughts about the approach we discussed.  PCI-X allows PIO read
responses to 'pass' DMA writes to system memory when the relaxed
ordering bit is set in the PCI-X command word _and_ the transaction has
the relaxed ordering bit set (so called "Relaxed Read Ordering" in
section 11.2 of the PCI-X addendum).  This effectively 'unserializes'
PIO vs. DMA transactions so that PIO reads doesn't get stuck behind an
unrelated DMA writes from the same device; something which can
potentially take awhile since cacheline ownership has to be acquired,
etc.

I'd like Linux to support relaxed read ordering in some way since on
large systems having PIO reads stuck behind DMA writes can end up eating
into CPU time and limit IOPS (do I have this right, Jeremy?).

The proposal I gave to Grant added a new readX() variant,
readX_relaxed(), that drivers could use when they don't need strict
ordering semantics (this may actually be the majority of cases, but it's
safer to be strict by default than create a read_ordered and open a
window for data corruption).  It might be confusing, however, to add yet
another readX() routine, and there are other ways we might go about it.
One suggestion was to overload the pci_sync_* calls so that they'd
explicitly flush DMA writes to system memory, implying that all reads on
some platforms would use relaxed semantics, but that we'd have to modify
drivers to add in pci_sync_* calls where needed.

Thoughts?

Thanks,
Jesse

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

end of thread, other threads:[~2004-01-11 14:35 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-07 17:58 [RFC] Relaxed PIO read vs. DMA write ordering Jesse Barnes
2004-01-07 19:02 ` Matthew Wilcox
2004-01-07 22:21   ` Grant Grundler
2004-01-07 23:07     ` Jesse Barnes
2004-01-07 23:27       ` Greg KH
2004-01-07 23:56         ` Jesse Barnes
2004-01-08  0:34           ` Jesse Barnes
2004-01-08  0:08         ` Jeremy Higdon
2004-01-08 10:01         ` Jes Sorensen
2004-01-08  6:38       ` Grant Grundler
2004-01-08 16:23         ` Leonid Grossman
2004-01-08 17:39           ` Jesse Barnes
2004-01-08 17:54           ` Christoph Hellwig
2004-01-08 19:48             ` Leonid Grossman
2004-01-08 17:36         ` Jesse Barnes
2004-01-08 18:44           ` Grant Grundler
2004-01-09  7:13             ` Jeremy Higdon
2004-01-09 19:51               ` Jesse Barnes
2004-01-09 23:15                 ` Jesse Barnes
2004-01-09 20:02               ` Grant Grundler
2004-01-11 14:34             ` James Bottomley
2004-01-09  7:39           ` Jochen Friedrich
2004-01-09 20:27             ` Grant Grundler
2004-01-09 22:12               ` Ivan Kokshaysky
2004-01-07 22:58   ` Jesse Barnes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).