Skip to contentSkip to conversation

ia64 rwsem using atomic primitive

Linux-ia64 Chen, Kenneth W 1 participant 1 message Feb 19, 2003

lore
Share & tools
lore
#0 lore raw

I have converted rw semaphore from current generic spin_lock implementation to use architecture specific atomic operation on ia64. This new scheme speeds up all the semaphore operations in the fast path with atomic instruction and fall back to a heavy function when there are read/write contention. I've also taken some raw measurement how fast it improves. The most significant gain comes from parallel reader lock acquire/release which has around 6.6X speed up with the new version. Here is a patch against 2.4.20.

<<rwsem.2.4.20.patch>>
- Ken

arch/ia64/config.in +2 -2
diff -Nur linux-2.4.20/arch/ia64/config.in linux-2.4.20.rwsem/arch/ia64/config.in
@@ -23,8 +23,8 @@
 define_bool CONFIG_EISA n
 define_bool CONFIG_MCA n
 define_bool CONFIG_SBUS n
-define_bool CONFIG_RWSEM_GENERIC_SPINLOCK y
-define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM n
+define_bool CONFIG_RWSEM_GENERIC_SPINLOCK n
+define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM y
 
 choice 'IA-64 processor type' \
 	"Itanium		CONFIG_ITANIUM \
include/asm-ia64/rwsem.h +171 -0

171 lines not on this page · raw message