Re: [PATCH 8/5] llist: Remove cpu_relax() usage in cmpxchg loops

From: Peter Zijlstra
Date: Mon Sep 12 2011 - 14:53:58 EST


On Mon, 2011-09-12 at 18:38 +0200, Andi Kleen wrote:
> > so basically, in typical locking primitives (spinlock), it looks like
> > lower power consumption is preferred over getting the raw maximal
>
> It's not only power, its:
> - Allow the other siblings make more progress on SMT
> - Do some backoff to stress the interconnect less (this is important on >2S):
> A tight loop which constantly writes is a extremly stressfull pattern.
> - Save some power by allowing the CPU to do more clock gating

If you're hitting a cmpxchg hard enough for any of those to make a
difference you're doing it wrong.
--
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/