[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180621135014.GA31371@gmail.com>
Date: Thu, 21 Jun 2018 15:50:14 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Mikulas Patocka <mpatocka@...hat.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Matthew Wilcox <matthew@....cx>, linux-kernel@...r.kernel.org,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] semaphore: use raw_spin_lock_irq instead of
raw_spin_lock_irqsave
* Mikulas Patocka <mpatocka@...hat.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@...hat.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.
Thanks,
Ingo
Powered by blists - more mailing lists