Skip to contentSkip to conversation

watchdog-perf-adapt-the-watchdog_perf-interface-for-async-model.patch removed from -mm tree

merged mm-nonmm-stable Andrew Morton 1 participant 1 message Jun 10, 2023

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: watchdog/perf: adapt the watchdog_perf interface for async model
has been removed from the -mm tree. Its filename was
watchdog-perf-adapt-the-watchdog_perf-interface-for-async-model.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Lecopzer Chen <[email protected]>
Subject: watchdog/perf: adapt the watchdog_perf interface for async model
Date: Fri, 19 May 2023 10:18:40 -0700

When lockup_detector_init()->watchdog_hardlockup_probe(), PMU may be not ready yet. E.g. on arm64, PMU is not ready until device_initcall(armv8_pmu_driver_init). And it is deeply integrated with the driver model and cpuhp. Hence it is hard to push this initialization before smp_init().

But it is easy to take an opposite approach and try to initialize the watchdog once again later. The delayed probe is called using workqueues. It need to allocate memory and must be proceed in a normal context. The delayed probe is able to use if watchdog_hardlockup_probe() returns non-zero which means the return code returned when PMU is not ready yet.

Provide an API - lockup_detector_retry_init() for anyone who needs to delayed init lockup detector if they had ever failed at lockup_detector_init().

The original assumption is: nobody should use delayed probe after lockup_detector_check() which has __init attribute. That is, anyone uses this API must call between lockup_detector_init() and lockup_detector_check(), and the caller must have __init attribute

Cc Andi Kleen <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Chen-Yu Tsai <[email protected]>
Cc Christophe Leroy <[email protected]>
Cc Colin Cross <[email protected]>
Cc Daniel Thompson <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Guenter Roeck <[email protected]>
Cc Ian Rogers <[email protected]>
Cc Marc Zyngier <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Masayoshi Mizuma <[email protected]>
Cc Matthias Kaehlcke <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Nicholas Piggin <[email protected]>
Cc Randy Dunlap <[email protected]>
Cc "Ravi V. Shankar" <[email protected]>
Cc Ricardo Neri <[email protected]>
Cc Stephane Eranian <[email protected]>
Cc Stephen Boyd <[email protected]>
Cc Sumit Garg <[email protected]>
Cc Tzung-Bi Shih <[email protected]>
Cc Will Deacon <[email protected]>

---

 include/linux/nmi.h |    2 +
 kernel/watchdog.c   |   67 +++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 68 insertions(+), 1 deletion(-)
include/linux/nmi.h renamed from include/linux/nmi.h~watchdog-perf-adapt-the-watchdog_perf-interface-for-async-model +2 -0
@@ -13,6 +13,7 @@
 
 #ifdef CONFIG_LOCKUP_DETECTOR
 void lockup_detector_init(void);
+void lockup_detector_retry_init(void);
 void lockup_detector_soft_poweroff(void);
 void lockup_detector_cleanup(void);
 
@@ -32,6 +33,7 @@ extern int sysctl_hardlockup_all_cpu_bac
 
 #else /* CONFIG_LOCKUP_DETECTOR */
 static inline void lockup_detector_init(void) { }
+static inline void lockup_detector_retry_init(void) { }
 static inline void lockup_detector_soft_poweroff(void) { }
 static inline void lockup_detector_cleanup(void) { }
 #endif /* !CONFIG_LOCKUP_DETECTOR */
kernel/watchdog.c renamed from kernel/watchdog.c~watchdog-perf-adapt-the-watchdog_perf-interface-for-async-model +66 -1

85 lines not on this page · raw message

_

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

arm64-add-hw_nmi_get_sample_period-for-preparation-of-lockup-detector.patch