Re: [patch] 2.6.6-rc3 Allow architectures to reenable interrupts oncontended spinlocks
From: Andrew Morton
Date: Fri Apr 30 2004 - 02:10:58 EST
Keith Owens <kaos@xxxxxxx> wrote:
>
> As requested by Linus, update all architectures to add the common
> infrastructure. Tested on ia64 and i386.
>
>
> Enable interrupts while waiting for a disabled spinlock, but only if
> interrupts were enabled before issuing spin_lock_irqsave().
Please test stuff with CONFIG_SMP=n?
include/linux/sched.h: In function `dequeue_signal_lock':
include/linux/sched.h:795: warning: implicit declaration of function `_raw_spin_lock_flags'
--- 25/include/linux/spinlock.h~allow-architectures-to-reenable-interrupts-on-contended-spinlocks-fix 2004-04-29 23:53:48.357203736 -0700
+++ 25-akpm/include/linux/spinlock.h 2004-04-29 23:54:15.053145336 -0700
@@ -46,6 +46,8 @@
#else
+#define _raw_spin_lock_flags(lock, flags) _raw_spin_lock(lock)
+
#if !defined(CONFIG_PREEMPT) && !defined(CONFIG_DEBUG_SPINLOCK)
# define atomic_dec_and_lock(atomic,lock) atomic_dec_and_test(atomic)
# define ATOMIC_DEC_AND_LOCK
_
The feature is only enabled for spin_lock_irqsave(). Should it not also do
something about spin_lock_irq()?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/