lkml.org 
[lkml]   [2013]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/3] lockref: use cpu_relax_simple()
Date
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@de.ibm.com>
---
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


\
 
 \ /
  Last update: 2013-09-27 10:21    [W:0.063 / U:0.844 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site