login
Header Space

 
 

Re: Spinlocks: Factor our GENERIC_LOCKBREAK in order to avoid spin with irqs disable

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ingo Molnar <mingo@...>
Cc: <linux-kernel@...>, Peter Zijlstra <a.p.zijlstra@...>
Date: Friday, May 9, 2008 - 12:28 pm

On Fri, 9 May 2008, Ingo Molnar wrote:


I thought that we already fall back to the functions that spin while 
having interrupts disabled if lockdep is on?

One issue: The BREAKLOCK value needs to be 1 in the fallback case 
otherwise we needlessly run atomic ops.

---
 kernel/spinlock.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/kernel/spinlock.c
===================================================================
--- linux-2.6.orig/kernel/spinlock.c	2008-05-07 16:00:06.000000000 -0700
+++ linux-2.6/kernel/spinlock.c	2008-05-07 16:00:29.000000000 -0700
@@ -218,7 +218,7 @@ do {									\
 
 #else
 
-#define BREAKLOCK(lock)	0
+#define BREAKLOCK(lock)	1
 #define BREAKLOCK_ENABLE(lock)	do { } while (0)
 #define BREAKLOCK_DISABLE(lock) do { } while (0)
 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Spinlocks: Factor our GENERIC_LOCKBREAK in order to avoi..., Christoph Lameter, (Mon Jun 23, 2:20 pm)
Re: Spinlocks: Factor our GENERIC_LOCKBREAK in order to avoi..., Christoph Lameter, (Mon Jun 23, 4:45 pm)
Re: Spinlocks: Factor our GENERIC_LOCKBREAK in order to avoi..., Jeremy Fitzhardinge, (Wed Jun 25, 10:51 pm)
Re: Spinlocks: Factor our GENERIC_LOCKBREAK in order to avoi..., Jeremy Fitzhardinge, (Mon Jul 7, 4:14 pm)
Re: Spinlocks: Factor our GENERIC_LOCKBREAK in order to avoi..., Jeremy Fitzhardinge, (Tue Jul 8, 1:57 am)
Re: Spinlocks: Factor our GENERIC_LOCKBREAK in order to avoi..., Jeremy Fitzhardinge, (Tue Jul 8, 11:58 am)
Re: Spinlocks: Factor our GENERIC_LOCKBREAK in order to avoi..., Jeremy Fitzhardinge, (Mon Jul 7, 11:53 am)
Re: Spinlocks: Factor our GENERIC_LOCKBREAK in order to avoi..., Jeremy Fitzhardinge, (Mon Jul 7, 11:56 am)
Re: Spinlocks: Factor our GENERIC_LOCKBREAK in order to avoi..., Christoph Lameter, (Thu Jun 26, 1:02 pm)
Re: Spinlocks: Factor our GENERIC_LOCKBREAK in order to avoi..., Jeremy Fitzhardinge, (Thu Jun 26, 11:49 am)
Re: Spinlocks: Factor our GENERIC_LOCKBREAK in order to avoi..., Christoph Lameter, (Fri May 9, 12:28 pm)
speck-geostationary