Re: spin_unlock optimization(i386)

Ingo Molnar (mingo@chiara.csoma.elte.hu)
Fri, 26 Nov 1999 21:33:02 +0100 (CET)


On Fri, 26 Nov 1999, Linus Torvalds wrote:

> > i believe this still doesnt turn off store forwarding. If two PCI commands
> > are written to the same register then they might get 'merged', resulting
> > in the first written command to be lost. This usually doesnt happen, but
> > can happen, and does happen in some cases.
>
> No, the MTRR's turn off store forwarding too.

ok. Then having ioremap_nocache() is completely pointless, because the
MTRRs already say that those areas are UC. (this is a different issue, not
correctness but just interface cleanliness)

> How do we know? Think about DOS. It doesn't _have_ page tables, it depends
> entirely on the MTRR's to do the right thing wrt IO memory.

ok.

> way to feed a networking card is to map a large buffer in PCI memory space
> and then use the MTRR's to mark it write combining but uncached (whatever
> intel calls that combination). That way the core will write combine and
> burst PCI writes, which is what you need for top performance.

The interface will likely be an ioremap_relaxed() done by the driver? Then
we could have ioremap() which does the UC thing we always did. And remove
ioremap_nocache().

-- mingo

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/