From: Alex Thorlton <athorlton@sgi.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Alex Thorlton <athorlton@sgi.com>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@kernel.org>,
John Stultz <john.stultz@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>, Russ Anderson <rja@sgi.com>,
Dimitri Sivanich <sivanich@sgi.com>
Subject: Re: [BUG] Boot hangs at clocksource_done_booting on large configs
Date: Mon, 31 Aug 2015 15:55:45 -0500 [thread overview]
Message-ID: <20150831205545.GT20615@asylum.americas.sgi.com> (raw)
In-Reply-To: <20150831203250.GH16853@twins.programming.kicks-ass.net>
On Mon, Aug 31, 2015 at 10:32:50PM +0200, Peter Zijlstra wrote:
> On Mon, Aug 31, 2015 at 01:04:33PM -0500, Alex Thorlton wrote:
> q
> > diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
> > index fd643d8..8502521 100644
> > --- a/kernel/stop_machine.c
> > +++ b/kernel/stop_machine.c
> > @@ -417,8 +417,11 @@ static void cpu_stopper_thread(unsigned int cpu)
> > {
> > struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu);
> > struct cpu_stop_work *work;
> > + unsigned long flags;
> > int ret;
> >
> > + local_irq_save(flags);
> > +
> > repeat:
> > work = NULL;
> > spin_lock_irq(&stopper->lock);
> > @@ -452,6 +455,8 @@ repeat:
> > cpu_stop_signal_done(done, true);
> > goto repeat;
> > }
> > +
> > + local_irq_restore(flags);
> > }
> >
>
> So I should probably just go sleep and not say anything.. _but_
> *confused*.
>
> That local_irq_save() will disable IRQs over:
>
> work = NULL;
>
> But that is _all_. The spin_unlock_irq() will re-enable IRQs, after
> which things will run as usual.
>
> That local_irq_restore() is a total NOP, IRQs are guaranteed enabled at
> the irq_local_save() (otherwise lockdep would've complained about
> spin_unlock_irq() unconditionally enabling them) and by the time we get
> to the restore that same unlock_irq will have enabled them already.
Ahh, right. Well that code is worthless then :)
Either way though, I guess that means that slight change just fudged the
timing enough in that area to avoid the lockup we're seeing. Ignoring
my useless code change, does anything else jump out at you as
interesting, here?
next prev parent reply other threads:[~2015-08-31 20:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-31 18:04 Alex Thorlton
2015-08-31 18:25 ` Alex Thorlton
2015-08-31 20:32 ` Peter Zijlstra
2015-08-31 20:55 ` Alex Thorlton [this message]
2015-08-31 21:12 ` Thomas Gleixner
2015-09-01 17:33 ` Alex Thorlton
2015-09-01 20:54 ` Thomas Gleixner
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=20150831205545.GT20615@asylum.americas.sgi.com \
--to=athorlton@sgi.com \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rja@sgi.com \
--cc=sivanich@sgi.com \
--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
Powered by JetHome