Re: start_kernel(): bug: interrupts were enabled early

From: Linus Torvalds
Date: Thu Apr 01 2010 - 16:17:58 EST

On Thu, 1 Apr 2010, Andrew Morton wrote:
> > So making the slow-path do the spin_[un]lock_irq{save,restore}() versions
> > sounds like the right thing. It won't be a performance issue: it _is_ the
> > slow-path, and we're already doing the expensive part (the spinlock itself
> > and the irq thing).
> It's actually on the fastpath for lib/rwsem-spinlock.c.

Ahh, yes. In this case, that doesn't likely change anything. The
save/restore versions of the irq-safe locks shouldn't be appreciably more
expensive than the non-saving ones. And architectures that really care
should have done their own per-arch optimized version anyway.

Maybe we should even document that - so that nobody else makes the mistake
x86-64 did of thinking that the "generic spinlock" version of the rwsem's
is anything but a hacky and bad fallback case.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at