Skip to contentSkip to conversation

sched/debug,sched/core: Reset hung task detector while processing sysrq-t

PATCH New Qingjie Xing 1 participant 1 message Jun 7, 2023 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched/debug,sched/core: Reset hung task detector while processing sysrq-t

On devices with multiple CPUs and multiple processes, outputting lengthy sysrq-t content on a slow serial port can consume a significant amount of time. We need to reset the hung task detector to avoid false hung task alerts.

---
 kernel/sched/core.c  | 1 +
 kernel/sched/debug.c | 1 +
 2 files changed, 2 insertions(+)
kernel/sched/core.c +1 -0
index a68d1276bab0..5773283b752c 100644
@@ -9176,6 +9176,7 @@ void show_state_filter(unsigned int state_filter)
 		 */
 		touch_nmi_watchdog();
 		touch_all_softlockup_watchdogs();
+		reset_hung_task_detector();
 		if (state_filter_match(state_filter, p))
 			sched_show_task(p);
 	}
kernel/sched/debug.c +1 -0
index 0b2340a79b65..43065808b425 100644
@@ -904,6 +904,7 @@ void sysrq_sched_debug_show(void)
 		 */
 		touch_nmi_watchdog();
 		touch_all_softlockup_watchdogs();
+		reset_hung_task_detector();
 		print_cpu(NULL, cpu);
 	}
 }
Signature · 1 line
2.40.1