[PATCH 2/3] lockref: use cpu_relax_simple()

From: Heiko Carstens
Date: Fri Sep 27 2013 - 04:04:19 EST


Make use of cpu_relax_simple() so architectures can override the default
cpu_relax() semantics.
This is especially useful for s390, where cpu_relax() means that the we
yield() the current (virtual) cpu and therefore is very expensive.

Signed-off-by: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
---
lib/lockref.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/lockref.c b/lib/lockref.c
index 677d036..1a00c33 100644
--- a/lib/lockref.c
+++ b/lib/lockref.c
@@ -19,7 +19,7 @@
if (likely(old.lock_count == prev.lock_count)) { \
SUCCESS; \
} \
- cpu_relax(); \
+ cpu_relax_simple(); \
} \
} while (0)

--
1.8.3.4

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