On Mon, Oct 13, 2008 at 09:01:44PM +0200, Johannes Dickgreber wrote: > If a cpu is WEAK_ORDERING schouldn't it do a sync independent of CONFIG_SMP ? > > And if it is a SMP system schouldn't it do a sync independent of CONFIG_WEAK_ORDERING ? > > And if a cpu has no sync with LLSC schouldn't it do a sync independent of CONFIG_SMP ? > > All together, is the following the right thing to do ? A processor is always consistently ordered wrt. to itself, so uniprocessor cores never need SYNCs even if that processor was weakly ordered in a multiprocessor systems. A while ago I walked through all mb(), rmb() and wmb() uses in the generic code. None of the ones I verified is actually needed on uniprocessor kernels. Ocasionally one of these functions is used to maintain I/O ordering but again other mechanisms are prefered for that purpose. Ralf