]> www.infradead.org Git - users/jedix/linux-maple.git/commit
llist: Move cpu_relax() to after the cmpxchg()
authorHuang Ying <ying.huang@intel.com>
Thu, 8 Sep 2011 06:00:44 +0000 (14:00 +0800)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 5 Dec 2012 16:59:01 +0000 (11:59 -0500)
commite84c4879898cb0a1864a6b09b1f4b619949e1c65
treed21fe4a635072795d6390562625d587ab4b421e6
parenta27cdb66ece70e30b97b6dcd703ea00b82edc766
llist: Move cpu_relax() to after the cmpxchg()

If in llist_add()/etc. functions the first cmpxchg() call succeeds, it is
not necessary to use cpu_relax() before the cmpxchg(). So cpu_relax() in
a busy loop involving cmpxchg() should go after cmpxchg() instead of before
that.

This patch fixes this for all involved llist functions.

Signed-off-by: Huang Ying <ying.huang@intel.com>
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1315461646-1379-4-git-send-email-ying.huang@intel.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
(cherry picked from commit a3127336b71f6833d1483c856dce91fe558dc3a9)
include/linux/llist.h
lib/llist.c