watchdog-perf-ensure-cpu-bound-context-when-creating-hardlockup-detector-event.patch removed from -mm tree
The quilt patch titled
Subject: watchdog/perf: ensure CPU-bound context when creating hardlockup detector event
has been removed from the -mm tree. Its filename was
watchdog-perf-ensure-cpu-bound-context-when-creating-hardlockup-detector-event.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: Pingfan Liu <[email protected]>
Subject: watchdog/perf: ensure CPU-bound context when creating hardlockup detector event
Date: Fri, 19 May 2023 10:18:29 -0700
hardlockup_detector_event_create() should create perf_event on the current CPU. Preemption could not get disabled because perf_event_create_kernel_counter() allocates memory. Instead, the CPU locality is achieved by processing the code in a per-CPU bound kthread.
Add a check to prevent mistakes when calling the code in another code path.
---
kernel/watchdog_hld.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
kernel/watchdog_hld.c renamed from kernel/watchdog_hld.c~watchdog-perf-ensure-cpu-bound-context-when-creating-hardlockup-detector-event +7 -1
@@ -165,10 +165,16 @@ static void watchdog_overflow_callback(sstatic int hardlockup_detector_event_create (void ) { -unsigned int cpu =smp_processor_id (); +unsigned int cpu;struct perf_event_attr *wd_attr;struct perf_event *evt; +/* +* Preemption is not disabled because memory will be allocated. +* Ensure CPU-locality by calling this in per-CPU kthread. +*/ +WARN_ON (!is_percpu_thread ()); + cpu =raw_smp_processor_id (); wd_attr = &wd_hw_attr; wd_attr->sample_period =hw_nmi_get_sample_period (watchdog_thresh);
_
Patches currently in -mm which might be from [email protected] are