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

From: Ingo Molnar
Date: Fri May 09 2008 - 06:26:29 EST



* Christoph Lameter <clameter@xxxxxxx> wrote:

> Subject: Spinlocks: Factor our GENERIC_LOCKBREAK in order to avoid
> spin with irqs disabled
>
> The nice spinlock functions that enable interrupts while spinning are
> only usable if GENERIC_LOCKBREAK is set (and we do not debug locks but
> lock debugging would not be used for a production configuration).
>
> Factor out the dependencies on the ->lock_break field from the nice
> functions into a set of BREAKLOCK macros (cannot be functions since
> the type of the lock variable varies).
>
> The nice spinlock function can then also be used if !GENERIC_LOCKBREAK

hm, there was some lockdep complication in this area. I guess we could
use the 'nice' variants too if their irq-enabling/disabling was properly
lockdep annotated and tracked by the irqflags machinery?

Ingo
--
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/