[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e7296a3d65a6445fa6ad4f81a3f7cd55@baidu.com>
Date: Wed, 17 Dec 2025 07:43:48 +0000
From: "Li,Rongqing" <lirongqing@...du.com>
To: Lance Yang <lance.yang@...ux.dev>
CC: Nicholas Piggin <npiggin@...il.com>, Christophe Leroy
<chleroy@...nel.org>, Martin KaFai Lau <martin.lau@...ux.dev>, "Eduard
Zingerman" <eddyz87@...il.com>, Song Liu <song@...nel.org>, Yonghong Song
<yonghong.song@...ux.dev>, John Fastabend <john.fastabend@...il.com>, "KP
Singh" <kpsingh@...nel.org>, Stanislav Fomichev <sdf@...ichev.me>, Hao Luo
<haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>, "linux-aspeed@...ts.ozlabs.org"
<linux-aspeed@...ts.ozlabs.org>, "linux-openrisc@...r.kernel.org"
<linux-openrisc@...r.kernel.org>, "linuxppc-dev@...ts.ozlabs.org"
<linuxppc-dev@...ts.ozlabs.org>, "dri-devel@...ts.freedesktop.org"
<dri-devel@...ts.freedesktop.org>, "bpf@...r.kernel.org"
<bpf@...r.kernel.org>, "linux-kselftest@...r.kernel.org"
<linux-kselftest@...r.kernel.org>, "wireguard@...ts.zx2c4.com"
<wireguard@...ts.zx2c4.com>, "netdev@...r.kernel.org"
<netdev@...r.kernel.org>, Andrew Morton <akpm@...ux-foundation.org>
Subject: 答复: [外部邮件] Re: [PATCH] watchdog: softlockup: panic when lockup duration exceeds N thresholds
> > diff --git a/Documentation/admin-guide/kernel-parameters.txt
> > b/Documentation/admin-guide/kernel-parameters.txt
> > index a8d0afd..27c5f96 100644
> > --- a/Documentation/admin-guide/kernel-parameters.txt
> > +++ b/Documentation/admin-guide/kernel-parameters.txt
> > @@ -6934,12 +6934,12 @@ Kernel parameters
> >
> > softlockup_panic=
> > [KNL] Should the soft-lockup detector generate panics.
> > - Format: 0 | 1
> > + Format: <int>
> >
> > - A value of 1 instructs the soft-lockup detector
> > - to panic the machine when a soft-lockup occurs. It is
> > - also controlled by the kernel.softlockup_panic sysctl
> > - and CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC, which is the
> > + A value of non-zero instructs the soft-lockup detector
> > + to panic the machine when a soft-lockup duration exceeds
> > + N thresholds. It is also controlled by the kernel.softlockup_panic
> > + sysctl and CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC, which is
> the
> > respective build-time switch to that functionality.
>
> Seems like kernel/configs/debug.config still has the old format "#
> CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set" ...
>
> Should be updated to "CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=0", right?
>
Will fix
> >
> > softlockup_all_cpu_backtrace=
> > diff --git a/arch/arm/configs/aspeed_g5_defconfig
> > b/arch/arm/configs/aspeed_g5_defconfig
> > index 2e6ea13..ec558e5 100644
> > --- a/arch/arm/configs/aspeed_g5_defconfig
> > +++ b/arch/arm/configs/aspeed_g5_defconfig
> > @@ -306,7 +306,7 @@ CONFIG_SCHED_STACK_END_CHECK=y
> > CONFIG_PANIC_ON_OOPS=y
> > CONFIG_PANIC_TIMEOUT=-1
> > CONFIG_SOFTLOCKUP_DETECTOR=y
> > -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
> > +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1
> > CONFIG_BOOTPARAM_HUNG_TASK_PANIC=1
> > CONFIG_WQ_WATCHDOG=y
> > # CONFIG_SCHED_DEBUG is not set
> > diff --git a/arch/arm/configs/pxa3xx_defconfig
> > b/arch/arm/configs/pxa3xx_defconfig
> > index 07d422f..fb272e3 100644
> > --- a/arch/arm/configs/pxa3xx_defconfig
> > +++ b/arch/arm/configs/pxa3xx_defconfig
> > @@ -100,7 +100,7 @@ CONFIG_PRINTK_TIME=y
> > CONFIG_DEBUG_KERNEL=y
> > CONFIG_MAGIC_SYSRQ=y
> > CONFIG_DEBUG_SHIRQ=y
> > -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
> > +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1
> > # CONFIG_SCHED_DEBUG is not set
> > CONFIG_DEBUG_SPINLOCK=y
> > CONFIG_DEBUG_SPINLOCK_SLEEP=y
> > diff --git a/arch/openrisc/configs/or1klitex_defconfig
> > b/arch/openrisc/configs/or1klitex_defconfig
> > index fb1eb9a..984b0e3 100644
> > --- a/arch/openrisc/configs/or1klitex_defconfig
> > +++ b/arch/openrisc/configs/or1klitex_defconfig
> > @@ -52,5 +52,5 @@
> CONFIG_LSM="lockdown,yama,loadpin,safesetid,integrity,bpf"
> > CONFIG_PRINTK_TIME=y
> > CONFIG_PANIC_ON_OOPS=y
> > CONFIG_SOFTLOCKUP_DETECTOR=y
> > -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
> > +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1
> > CONFIG_BUG_ON_DATA_CORRUPTION=y
> > diff --git a/arch/powerpc/configs/skiroot_defconfig
> > b/arch/powerpc/configs/skiroot_defconfig
> > index 2b71a6d..a4114fc 100644
> > --- a/arch/powerpc/configs/skiroot_defconfig
> > +++ b/arch/powerpc/configs/skiroot_defconfig
> > @@ -289,7 +289,7 @@ CONFIG_SCHED_STACK_END_CHECK=y
> > CONFIG_DEBUG_STACKOVERFLOW=y
> > CONFIG_PANIC_ON_OOPS=y
> > CONFIG_SOFTLOCKUP_DETECTOR=y
> > -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
> > +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1
> > CONFIG_HARDLOCKUP_DETECTOR=y
> > CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=y
> > CONFIG_WQ_WATCHDOG=y
> > diff --git a/drivers/gpu/drm/ci/arm.config
> > b/drivers/gpu/drm/ci/arm.config index 411e814..d7c5167 100644
> > --- a/drivers/gpu/drm/ci/arm.config
> > +++ b/drivers/gpu/drm/ci/arm.config
> > @@ -52,7 +52,7 @@ CONFIG_TMPFS=y
> > CONFIG_PROVE_LOCKING=n
> > CONFIG_DEBUG_LOCKDEP=n
> > CONFIG_SOFTLOCKUP_DETECTOR=n
> > -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=n
> > +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=0
> >
> > CONFIG_FW_LOADER_COMPRESS=y
> >
> > diff --git a/drivers/gpu/drm/ci/arm64.config
> > b/drivers/gpu/drm/ci/arm64.config index fddfbd4..ea0e307 100644
> > --- a/drivers/gpu/drm/ci/arm64.config
> > +++ b/drivers/gpu/drm/ci/arm64.config
> > @@ -161,7 +161,7 @@ CONFIG_TMPFS=y
> > CONFIG_PROVE_LOCKING=n
> > CONFIG_DEBUG_LOCKDEP=n
> > CONFIG_SOFTLOCKUP_DETECTOR=y
> > -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
> > +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1
> >
> > CONFIG_DETECT_HUNG_TASK=y
> >
> > diff --git a/drivers/gpu/drm/ci/x86_64.config
> > b/drivers/gpu/drm/ci/x86_64.config
> > index 8eaba388..7ac98a7 100644
> > --- a/drivers/gpu/drm/ci/x86_64.config
> > +++ b/drivers/gpu/drm/ci/x86_64.config
> > @@ -47,7 +47,7 @@ CONFIG_TMPFS=y
> > CONFIG_PROVE_LOCKING=n
> > CONFIG_DEBUG_LOCKDEP=n
> > CONFIG_SOFTLOCKUP_DETECTOR=y
> > -CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
> > +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1
> >
> > CONFIG_DETECT_HUNG_TASK=y
> >
> > diff --git a/kernel/watchdog.c b/kernel/watchdog.c index
> > 0685e3a..a5fa116 100644
> > --- a/kernel/watchdog.c
> > +++ b/kernel/watchdog.c
> > @@ -363,7 +363,7 @@ static struct cpumask watchdog_allowed_mask
> > __read_mostly;
> >
> > /* Global variables, exported for sysctl */
> > unsigned int __read_mostly softlockup_panic =
> > - IS_ENABLED(CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC);
> > + CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC;
> >
> > static bool softlockup_initialized __read_mostly;
> > static u64 __read_mostly sample_period; @@ -879,7 +879,9 @@ static
> > enum hrtimer_restart watchdog_timer_fn(struct hrtimer *hrtimer)
> >
> > add_taint(TAINT_SOFTLOCKUP, LOCKDEP_STILL_OK);
> > sys_info(softlockup_si_mask & ~SYS_INFO_ALL_BT);
> > - if (softlockup_panic)
> > + duration = duration / get_softlockup_thresh();
>
> Nit: reusing "duration" here makes things a bit confusing, maybe just use a temp
> variable?
>
> thresh_count = duration / get_softlockup_thresh();
>
> if (softlockup_panic && thresh_count >= softlockup_panic)
> panic("softlockup: hung tasks");
>
Will change in next version, thanks
[Li,Rongqing]
Powered by blists - more mailing lists