Re: [PATCH] Define wc_wmb, a write barrier for PCI write combining

From: Jes Sorensen
Date: Tue Feb 28 2006 - 11:05:55 EST


Roland Dreier wrote:
Jes> Could you explain why the current mmiowb() API won't suffice
Jes> for this? It seems that this is basically trying to achieve
Jes> the same thing.

I don't believe mmiowb() is at all the same thing. mmiowb() is all
about ordering writes between _different_ CPUs without incurring the
cost of flushing posted writes by issuing a read on the bus.

Not quite correct as far as I understand it. mmiowb() is supposed to
guarantee that writes to MMIO space have completed before continuing.
That of course covers the multi-CPU case, but it should also cover the
write-combining case.

> wc_wmb()
would just act like a true wmb(), even when using write-combining
regions on x86 -- in other words, there would be no cross-CPU synchronization.

I wary of adding yet another variation unless there is a clear
distinction between them that is easy to understandn for driver authors.

Cheers,
Jes
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/