[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1807301440340.2518@nanos.tec.linutronix.de>
Date: Mon, 30 Jul 2018 14:41:01 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Peter Zijlstra <peterz@...radead.org>
cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
isaacm@...eaurora.org, matt@...eblueprint.co.uk, mingo@...nel.org,
linux-kernel@...r.kernel.org, psodagud@...eaurora.org,
gregkh@...uxfoundation.org, pkondeti@...eaurora.org,
stable@...r.kernel.org
Subject: Re: [PATCH] stop_machine: Disable preemption after queueing stopper
threads
On Mon, 30 Jul 2018, Peter Zijlstra wrote:
> On Mon, Jul 30, 2018 at 12:20:57PM +0200, Thomas Gleixner wrote:
> > On Tue, 24 Jul 2018, Sebastian Andrzej Siewior wrote:
> > > On 2018-07-23 18:13:48 [-0700], isaacm@...eaurora.org wrote:
> > > > Hi all,
> > > Hi,
> > >
> > > > Are there any comments about this patch?
> > >
> > > I haven't look in detail at this but your new preempt_disable() makes
> > > things unbalanced for the err != 0 case.
> >
> > It doesn't but that code is really an unreadable pile of ...
>
> ---
> Subject: stop_machine: Reflow cpu_stop_queue_two_works()
>
> The code flow in cpu_stop_queue_two_works() is a little arcane; fix
> this by lifting the preempt_disable() to the top to create more natural
> nesting wrt the spinlocks and make the wake_up_q() and preempt_enable()
> unconditional at the end.
>
> Furthermore, enable preemption in the -EDEADLK case, such that we
> spin-wait with preemption enabled.
>
> Suggested-by: Thomas Gleixner <tglx@...utronix.de>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Thanks for cleaning that up!
Reviewed-by: Thomas Gleixner <tglx@...utronix.de>
Powered by blists - more mailing lists