Re: [PATCH 4/4] locking: Introduce smp_cond_acquire()
From: Oleg Nesterov
Date: Thu Nov 12 2015 - 13:37:09 EST
On 11/12, Peter Zijlstra wrote:
> On Thu, Nov 12, 2015 at 07:38:07PM +0100, Oleg Nesterov wrote:
> > It seems that PPC needs to define smp_mb__before_spinlock() as full mb(),
> > no?
> It does:
> arch/powerpc/include/asm/barrier.h:#define smp_mb__before_spinlock() smp_mb()
Ah, indeed, thanks.
And given that it also defines smp_mb__after_unlock_lock() as smp_mb(),
I am starting to understand how it can help to avoid the races with
spin_unlock_wait() in (for example) do_exit().
But as Boqun has already mentioned, this means that mb__after_unlock_lock()
has the new meaning which should be documented.
Hmm. And 12d560f4 "Privatize smp_mb__after_unlock_lock()" should be reverted
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/