]> git.karo-electronics.de Git - karo-tx-linux.git/commit
llist: move cpu_relax after cmpxchg
authorHuang Ying <ying.huang@intel.com>
Wed, 28 Sep 2011 00:50:48 +0000 (10:50 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 30 Sep 2011 04:53:41 +0000 (14:53 +1000)
commit3b713e879c33497e2357ffe6ef28e9752d65eced
tree20d001db768e72e1b22364cdebe95c394e5c00c7
parent03ed064458ca1f55df7c1cd7074e9d02ca7cdce9
llist: move cpu_relax after cmpxchg

If the first cmpxchg call succeeds, it is not necessary to use cpu_relax
before cmpxchg.  So cpu_relax in a busy loop involving cmpxchg should go
after cmpxchg instead of before that.  This patch fixes this in llist.

Signed-off-by: Huang Ying <ying.huang@intel.com>
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Andrew Morton <>
include/linux/llist.h