Re: [PATCH] Missing memory barrier in pte_chain_unlock

From: Andrew Morton (akpm@zip.com.au)
Date: Thu Jul 25 2002 - 13:35:50 EST


Anton Blanchard wrote:
>
> ...
> + smp_mb__before_clear_bit();
> clear_bit(PG_chainlock, &page->flags);

Bah. The problem with this smp_mb thing is that nobody knows
what it does, nobody remembers to do it and it's as ugly as sin.

I bet there are plenty of identical bugs around the place which
haven't been discovered yet.

Is there some clean, centralised way of fixing this problem
permanently?

Correctness comes first. Why not move the barrier into
clear_bit() and then have a clear_bit_no_mb() operation for those
performance-sensitive places where the barrier is not needed?

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



This archive was generated by hypermail 2b29 : Tue Jul 30 2002 - 14:00:21 EST