linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Triggering a softlockup panic during SMP boot
@ 2023-10-27 21:46 Krister Johansen
  2023-10-27 21:46 ` [PATCH 1/2] proc: sysctl: prevent aliased sysctls from getting passed to init Krister Johansen
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Krister Johansen @ 2023-10-27 21:46 UTC (permalink / raw)
  To: Luis Chamberlain, Kees Cook, Iurii Zaikin, linux-kernel,
	linux-fsdevel
  Cc: Douglas Anderson, Vlastimil Babka, Arnd Bergmann, Lecopzer Chen,
	Nick Desaulniers, Thomas Gleixner, David Hildenbrand,
	Masami Hiramatsu, Pingfan Liu, Michael Kelley, Petr Mladek,
	Andrew Morton, Josh Poimboeuf, Guilherme G. Piccoli,
	Mike Rapoport, Peter Zijlstra

Hi,
This pair of patches was the result of an unsuccessful attempt to set
softlockup_panic before SMP boot.  The rationale for wanting to set this
parameter is that some of the VMs that my team runs will occasionally
get stuck while onlining the non-boot processors as part of SMP boot.

In the cases where this happens, we find out about it after the instance
successfully boots; however, the machines can get stuck for tens of
minutes at a time before finally completing onlining processors.  Since
we pay per minute for many of these VMs there were two goals for setting
this value on boot: first, fail fast and hope that a subsequent boot
attempt will be successful.  Second, a panic is a little easier to keep
track of, especially if we're scraping serial logs after the fact.  In
essence, the goal is to trigger the failure earlier and hopefully get
more useful information for further debugging the problem as well.

While testing to make sure that this value was getting correctly set on
boot, I ran into a pair of surprises.  First, when the softlockup_panic
parameter was migrated to a sysctl alias, it had the side effect of
setting the parameter value after SMP boot has occurred, when it used to
be set before this.  Second, testing revealed that even though the
aliases were being correctly processed, the kernel was reporting the
commandline arguments as unrecognized. This generated a message in the
logs about an unrecognized parameter (even though it was) and the
parameter was passed as an environment variable to init.

The first patch ensures that aliased sysctl arguments are not reported
as unrecognized boot arguments.

The second patch moves the setting of softlockup_panic earlier in boot,
where it can take effect before SMP boot beings.

Thanks,

-K

Krister Johansen (2):
  proc: sysctl: prevent aliased sysctls from getting passed to init
  watchdog: move softlockup_panic back to early_param

 fs/proc/proc_sysctl.c  | 8 +++++++-
 include/linux/sysctl.h | 6 ++++++
 init/main.c            | 4 ++++
 kernel/watchdog.c      | 7 +++++++
 4 files changed, 24 insertions(+), 1 deletion(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-11-01 19:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-27 21:46 [PATCH 0/2] Triggering a softlockup panic during SMP boot Krister Johansen
2023-10-27 21:46 ` [PATCH 1/2] proc: sysctl: prevent aliased sysctls from getting passed to init Krister Johansen
2023-10-27 21:46 ` [PATCH 2/2] watchdog: move softlockup_panic back to early_param Krister Johansen
2023-10-27 22:04 ` [PATCH 0/2] Triggering a softlockup panic during SMP boot Luis Chamberlain
2023-10-27 23:06   ` Krister Johansen
2023-11-01 19:10 ` Luis Chamberlain

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).