lkml.org 
[lkml]   [2018]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] semaphore: use raw_spin_lock_irq instead of raw_spin_lock_irqsave

* Ingo Molnar <mingo@kernel.org> wrote:

>
> * Ingo Molnar <mingo@kernel.org> wrote:
>
> >
> > * Mikulas Patocka <mpatocka@redhat.com> wrote:
> >
> > > The sleeping functions down, down_interruptible, down_killable and
> > > down_timeout can't be called with interrupts disabled, so we don't have to
> > > save and restore interrupt flag.
> > >
> > > This patch avoids the costly pushf and popf instructions on the semaphore
> > > path.
> > >
> > > Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> > >
> > > ---
> > > kernel/locking/semaphore.c | 21 ++++++++-------------
> > > 1 file changed, 8 insertions(+), 13 deletions(-)
> >
> > I've applied this to the locking tree, I suspect we can do this on the condition
> > that it doesn't explode in early boot code (which has irqs disabled) and doesn't
> > generate early boot lockdep splats either.
>
> Hm, this blew up pretty quick on a pretty regular x86-64 PC white-box, during
> early bootup:
>
> PANIC: early exception 0x08 IP 246:10 error ffffffff811537b2 cr2 0xffff88000240cff8
>
> and I think it's due to your patch - verifying that now.

Yeah, went away after removing that patch. So I'm skipping this for now.

Thanks,

Ingo

\
 
 \ /
  Last update: 2018-06-21 16:18    [W:0.411 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site