From: Mike Galbraith <efault@gmx.de>
To: Peter Zijlstra <peterz@infradead.org>,
Sodagudi Prasad <psodagud@codeaurora.org>
Cc: mingo@kernel.org, gregkh@linuxfoundation.org,
bigeasy@linutronix.de, tglx@linutronix.de, isaacm@codeaurora.org,
linux-kernel@vger.kernel.org
Subject: Re: cpu stopper threads and setaffinity leads to deadlock
Date: Thu, 02 Aug 2018 10:27:58 +0200 [thread overview]
Message-ID: <1533198478.11791.10.camel@gmx.de> (raw)
In-Reply-To: <20180802081252.GG2494@hirez.programming.kicks-ass.net>
On Thu, 2018-08-02 at 10:12 +0200, Peter Zijlstra wrote:
> On Wed, Aug 01, 2018 at 06:34:40PM -0700, Sodagudi Prasad wrote:
> > diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
> > index e190d1e..f932e1e 100644
> > --- a/kernel/stop_machine.c
> > +++ b/kernel/stop_machine.c
> > @@ -87,9 +87,9 @@ static bool cpu_stop_queue_work(unsigned int cpu, struct
> > cpu_stop_work *work)
> > __cpu_stop_queue_work(stopper, work, &wakeq);
> > else if (work->done)
> > cpu_stop_signal_done(work->done);
> > - raw_spin_unlock_irqrestore(&stopper->lock, flags);
> >
> > wake_up_q(&wakeq);
> > + raw_spin_unlock_irqrestore(&stopper->lock, flags);
> >
>
> That puts the wakeup back under stopper lock, which causes another
> deadlock iirc.
Yup, one you fixed.
0b26351b910fb (Peter Zijlstra 2018-04-20 11:50:05 +0200 92) wake_up_q(&wakeq);
next prev parent reply other threads:[~2018-08-02 8:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-02 1:34 cpu stopper threads and setaffinity leads to deadlock Sodagudi Prasad
2018-08-02 8:12 ` Peter Zijlstra
2018-08-02 8:27 ` Mike Galbraith [this message]
2018-08-02 8:45 ` Peter Zijlstra
2018-08-02 9:49 ` Peter Zijlstra
2018-08-03 11:41 ` Thomas Gleixner
2018-08-03 18:57 ` Sodagudi Prasad
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1533198478.11791.10.camel@gmx.de \
--to=efault@gmx.de \
--cc=bigeasy@linutronix.de \
--cc=gregkh@linuxfoundation.org \
--cc=isaacm@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=psodagud@codeaurora.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).