Skip to contentSkip to conversation

ia64 rwsem using atomic primitive

Linux-ia64 Chen, Kenneth W 2 participants 3 messages Feb 19, 2003

lore
Share & tools
lore
#0 lore raw

Here is a patch against 2.5.60. It has one new function added __downgrade_write() for 2.5.

- Ken

<<rwsem.2.5.60.patch>>

Quoted 11 lines

-----Original Message-----
From: Chen, Kenneth W
Sent: Wednesday, February 19, 2003 10:30 AM
To: '[email protected]'
Subject: ia64 rwsem using atomic primitive

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.

<< File: rwsem.2.4.20.patch >>
- Ken

arch/ia64/Kconfig +1 -1
diff -Nur linux-2.5.60/arch/ia64/Kconfig linux-2.5.60.rwsem/arch/ia64/Kconfig
@@ -26,7 +26,7 @@
 	bool
 	default y
 
-config RWSEM_GENERIC_SPINLOCK
+config RWSEM_XCHGADD_ALGORITHM
 	bool
 	default y
 
include/asm-ia64/rwsem.h +188 -0

188 lines not on this page · raw message

#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Kenneth W

Ken> Here is a patch against 2.5.60. It has one new function added Ken> __downgrade_write() for 2.5. - Ken

I glanced over the patch and it looks fine, except that it has CR-LF for end-of-line. Could you resend with the carriage-returns removed?

Thanks,

	--david
#2 lore raw
In reply to Chen, Kenneth W

Hi David,

Here it is again with the CR-LF removed. Sorry.

- Ken

-----Original Message-----
From: David Mosberger [mailto:[email protected]]
Sent: Wednesday, February 19, 2003 11:53 AM
To: Chen, Kenneth W
Cc: [email protected]
Subject: Re: [Linux-ia64] RE: ia64 rwsem using atomic primitive

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Kenneth W

Ken> Here is a patch against 2.5.60. It has one new function added Ken> __downgrade_write() for 2.5. - Ken

I glanced over the patch and it looks fine, except that it has CR-LF for end-of-line. Could you resend with the carriage-returns removed?

Thanks,

	--david
arch/ia64/Kconfig +1 -1
diff -Nur linux-2.5.60/arch/ia64/Kconfig linux-2.5.60.rwsem/arch/ia64/Kconfig
@@ -26,7 +26,7 @@
 	bool
 	default y
 
-config RWSEM_GENERIC_SPINLOCK
+config RWSEM_XCHGADD_ALGORITHM
 	bool
 	default y
 
include/asm-ia64/rwsem.h +188 -0

188 lines not on this page · raw message