* + watchdog-softlockup-fix-wrong-output-when-watchdog_thresh-3.patch added to mm-nonmm-unstable branch
@ 2025-08-18 2:09 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-08-18 2:09 UTC (permalink / raw)
To: mm-commits, yaoma, tglx, max.kellermann, lihuafei1, yaozhenguo1,
akpm
The patch titled
Subject: watchdog/softlockup: fix wrong output when watchdog_thresh < 3
has been added to the -mm mm-nonmm-unstable branch. Its filename is
watchdog-softlockup-fix-wrong-output-when-watchdog_thresh-3.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/watchdog-softlockup-fix-wrong-output-when-watchdog_thresh-3.patch
This patch will later appear in the mm-nonmm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: ZhenguoYao <yaozhenguo1@gmail.com>
Subject: watchdog/softlockup: fix wrong output when watchdog_thresh < 3
Date: Tue, 12 Aug 2025 15:41:32 +0800
When watchdog_thresh is below 3, sample_period will be less than 1 second.
So the following output will print when softlockup:
CPU#3 Utilization every 0s during lockup
Fix this by changing time unit from seconds to milliseconds.
Link: https://lkml.kernel.org/r/20250812074132.27810-1-yaozhenguo@jd.com
Signed-off-by: ZhenguoYao <yaozhenguo1@gmail.com>
Cc: Bitao Hu <yaoma@linux.alibaba.com>
Cc: Li Huafei <lihuafei1@huawei.com>
Cc: Max Kellermann <max.kellermann@ionos.com>
Cc: Thomas Gleinxer <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
kernel/watchdog.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/kernel/watchdog.c~watchdog-softlockup-fix-wrong-output-when-watchdog_thresh-3
+++ a/kernel/watchdog.c
@@ -455,17 +455,17 @@ static void print_cpustat(void)
{
int i, group;
u8 tail = __this_cpu_read(cpustat_tail);
- u64 sample_period_second = sample_period;
+ u64 sample_period_msecond = sample_period;
- do_div(sample_period_second, NSEC_PER_SEC);
+ do_div(sample_period_msecond, NSEC_PER_MSEC);
/*
* Outputting the "watchdog" prefix on every line is redundant and not
* concise, and the original alarm information is sufficient for
* positioning in logs, hence here printk() is used instead of pr_crit().
*/
- printk(KERN_CRIT "CPU#%d Utilization every %llus during lockup:\n",
- smp_processor_id(), sample_period_second);
+ printk(KERN_CRIT "CPU#%d Utilization every %llums during lockup:\n",
+ smp_processor_id(), sample_period_msecond);
for (i = 0; i < NUM_SAMPLE_PERIODS; i++) {
group = (tail + i) % NUM_SAMPLE_PERIODS;
_
Patches currently in -mm which might be from yaozhenguo1@gmail.com are
watchdog-softlockup-fix-wrong-output-when-watchdog_thresh-3.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-08-18 2:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-18 2:09 + watchdog-softlockup-fix-wrong-output-when-watchdog_thresh-3.patch added to mm-nonmm-unstable branch Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.