* Fwd: [patch 2/3] Directed yield: direct yield of spinlocks for powerpc.
@ 2006-09-18 12:21 Martin Schwidefsky
0 siblings, 0 replies; only message in thread
From: Martin Schwidefsky @ 2006-09-18 12:21 UTC (permalink / raw)
To: akpm; +Cc: linux-arch, mingo, paulus
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
[patch 2/3] Directed yield: direct yield of spinlocks for powerpc.
In order to implement a spinlock that yields the cpu in favour of
the current lock holder cpu_relax variants for spinlocks and
read/write locks are needed. The new _raw_spin_relax, _raw_read_relax
and _raw_write_relax primitives have an additional argument: the
pointer to the lock structure.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
include/asm-powerpc/spinlock.h | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff -urpN linux-2.6/include/asm-powerpc/spinlock.h linux-2.6-patched/include/asm-powerpc/spinlock.h
--- linux-2.6/include/asm-powerpc/spinlock.h 2006-09-18 14:12:04.000000000 +0200
+++ linux-2.6-patched/include/asm-powerpc/spinlock.h 2006-09-18 14:12:04.000000000 +0200
@@ -285,9 +285,9 @@ static __inline__ void __raw_write_unloc
rw->lock = 0;
}
-#define _raw_spin_relax(lock) cpu_relax()
-#define _raw_read_relax(lock) cpu_relax()
-#define _raw_write_relax(lock) cpu_relax()
+#define _raw_spin_relax(lock) __spin_yield(lock)
+#define _raw_read_relax(lock) __rw_yield(lock)
+#define _raw_write_relax(lock) __rw_yield(lock)
#endif /* __KERNEL__ */
#endif /* __ASM_SPINLOCK_H */
----- End forwarded message -----
--
blue skies,
Martin.
Martin Schwidefsky
Linux for zSeries Development & Services
IBM Deutschland Entwicklung GmbH
"Reality continues to ruin my life." - Calvin.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-09-18 12:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-18 12:21 Fwd: [patch 2/3] Directed yield: direct yield of spinlocks for powerpc Martin Schwidefsky
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.