From: Nicholas Piggin <npiggin@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
LKML <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Borislav Petkov <bp@alien8.de>,
Andrew Morton <akpm@linux-foundation.org>,
Sebastian Siewior <bigeasy@linutronix.de>,
Don Zickus <dzickus@redhat.com>,
Chris Metcalf <cmetcalf@mellanox.com>,
Ulrich Obergfell <uobergfe@redhat.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [patch V2 22/29] lockup_detector: Make watchdog_nmi_reconfigure() two stage
Date: Tue, 3 Oct 2017 20:01:26 +1000 [thread overview]
Message-ID: <20171003200126.358155b7@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1710030902310.2281@nanos>
On Tue, 3 Oct 2017 09:04:03 +0200 (CEST)
Thomas Gleixner <tglx@linutronix.de> wrote:
> On Tue, 3 Oct 2017, Thomas Gleixner wrote:
> > On Tue, 3 Oct 2017, Michael Ellerman wrote:
> > > Hi Thomas,
> > > Unfortunately this is hitting the WARN_ON in start_wd_cpu() on powerpc
> > > because we're calling it multiple times for the boot CPU.
> > >
> > > The first call is via:
> > >
> > > start_wd_on_cpu+0x80/0x2f0
> > > watchdog_nmi_reconfigure+0x124/0x170
> > > softlockup_reconfigure_threads+0x110/0x130
> > > lockup_detector_init+0xbc/0xe0
> > > kernel_init_freeable+0x18c/0x37c
> > > kernel_init+0x2c/0x160
> > > ret_from_kernel_thread+0x5c/0xbc
> > >
> > > And then again via the CPU hotplug registration:
> > >
> > > start_wd_on_cpu+0x80/0x2f0
> > > cpuhp_invoke_callback+0x194/0x620
> > > cpuhp_thread_fun+0x7c/0x1b0
> > > smpboot_thread_fn+0x290/0x2a0
> > > kthread+0x168/0x1b0
> > > ret_from_kernel_thread+0x5c/0xbc
> > >
> > >
> > > The first call is new because previously watchdog_nmi_reconfigure()
> > > wasn't called from softlockup_reconfigure_threads().
> >
> > Hmm, don't you have the same problem with CPU hotplug or do you just get
> > lucky because the hotplug callback in your code is ordered vs. the
> > softlockup thread hotplug callback in a way that this does not hit?
I had the idea that it watchdog_nmi_reconfigure() being only called
with get_online_cpus held would prevent hotplug callbacks running.
>
> Which leads me to the question why you need the hotplug state at all if the
> softlockup detector is enabled. Wouldn't it make more sense to only
> register the state if softlockup detector is turned off in Kconfig and
> actually move it to the core code?
I don't understand what you mean exactly, but it was done to avoid
relying on the softlockup detector at all, because it wasn't needed
for anything else (unlike the perf lockup detector).
Thanks,
Nick
next prev parent reply other threads:[~2017-10-03 10:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170912193654.321505854@linutronix.de>
2017-09-12 19:37 ` [patch V2 22/29] lockup_detector: Make watchdog_nmi_reconfigure() two stage Thomas Gleixner
2017-10-03 0:29 ` Michael Ellerman
2017-10-03 6:50 ` Thomas Gleixner
2017-10-03 7:04 ` Thomas Gleixner
2017-10-03 10:01 ` Nicholas Piggin [this message]
2017-10-03 10:56 ` Thomas Gleixner
2017-10-03 11:36 ` Michael Ellerman
2017-10-03 12:13 ` Thomas Gleixner
2017-10-03 13:20 ` Thomas Gleixner
2017-10-03 19:27 ` Thomas Gleixner
2017-10-04 5:53 ` Michael Ellerman
2017-10-05 16:17 ` Don Zickus
2017-09-12 19:37 ` [patch V2 29/29] lockup_detector: Cleanup hotplug locking mess 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=20171003200126.358155b7@roar.ozlabs.ibm.com \
--to=npiggin@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=bigeasy@linutronix.de \
--cc=bp@alien8.de \
--cc=cmetcalf@mellanox.com \
--cc=dzickus@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mingo@kernel.org \
--cc=mpe@ellerman.id.au \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=uobergfe@redhat.com \
/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).