lkml.org 
[lkml]   [2010]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: start_kernel(): bug: interrupts were enabled early


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.

Linus


\
 
 \ /
  Last update: 2010-04-01 22:21    [W:0.087 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site