Re: [PATCH] Profile likely/unlikely macros

From: Daniel Walker
Date: Tue Apr 25 2006 - 14:23:37 EST


On Tue, 2006-04-25 at 20:11 +1000, Nick Piggin wrote:

> I guess it is so it can be used in NMIs and interrupts without turning
> interrupts off (so is somewhat lightweight).
>
> But please Daniel, just use spinlocks and trylock. This is buggy because
> it doesn't get the required release consistency correct.


To use spinlock we would need to used the __raw_ types . As Hua
explained all of the vanilla spinlock calls use the unlikely macro. The
result is that we end up using atomic operations. So using them directly
seems like the cleanest method .

I'm not exactly sure what you mean by "release consistency" ?

Daniel

-
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/