Skip to contentSkip to conversation

watchdog-explicitly-update-timestamp-when-reporting-softlockup.patch removed from -mm tree

merged [email protected] 1 participant 1 message May 8, 2021

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: watchdog: explicitly update timestamp when reporting softlockup
has been removed from the -mm tree. Its filename was
watchdog-explicitly-update-timestamp-when-reporting-softlockup.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Petr Mladek <[email protected]>
Subject: watchdog: explicitly update timestamp when reporting softlockup

The softlockup situation might stay for a long time or even forever. When it happens, the softlockup debug messages are printed in regular intervals defined by get_softlockup_thresh().

There is a mystery. The repeated message is printed after the full interval that is defined by get_softlockup_thresh(). But the timer callback is called more often as defined by sample_period. The code looks like the soflockup should get reported in every sample_period when it was once behind the thresh.

It works only by chance. The watchdog is touched when printing the stall report, for example, in printk_stack_address().

Make the behavior clear and predictable by explicitly updating the timestamp in watchdog_timer_fn() when the report gets printed.

Cc Ingo Molnar <[email protected]>
Cc Laurence Oberman <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Vincent Whitchurch <[email protected]>

---

 kernel/watchdog.c |    3 +++
 1 file changed, 3 insertions(+)
kernel/watchdog.c renamed from kernel/watchdog.c~watchdog-explicitly-update-timestamp-when-reporting-softlockup +3 -0
@@ -410,6 +410,9 @@ static enum hrtimer_restart watchdog_tim
 			}
 		}
 
+		/* Start period for the next softlockup warning. */
+		update_touch_ts();
+
 		pr_emerg("BUG: soft lockup - CPU#%d stuck for %us! [%s:%d]\n",
 			smp_processor_id(), duration,
 			current->comm, task_pid_nr(current));

_

Patches currently in -mm which might be from [email protected] are