Skip to contentSkip to conversation

kfence-use-task_idle-when-awaiting-allocation.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jun 7, 2021 Stable branch

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: kfence: use TASK_IDLE when awaiting allocation
has been removed from the -mm tree. Its filename was
kfence-use-task_idle-when-awaiting-allocation.patch

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

------------------------------------------------------
From: Marco Elver <[email protected]>
Subject: kfence: use TASK_IDLE when awaiting allocation

Since wait_event() uses TASK_UNINTERRUPTIBLE by default, waiting for an allocation counts towards load. However, for KFENCE, this does not make any sense, since there is no busy work we're awaiting.

Instead, use TASK_IDLE via wait_event_idle() to not count towards load.

Fixes 407f1d8c1b5f ("kfence: await for allocation using wait_event")
Cc Mel Gorman <[email protected]>
Cc Alexander Potapenko <[email protected]>
Cc Dmitry Vyukov <[email protected]>
Cc David Laight <[email protected]>
Cc Hillf Danton <[email protected]>
Cc <[email protected]> [5.12+]

---

 mm/kfence/core.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
mm/kfence/core.c renamed from mm/kfence/core.c~kfence-use-task_idle-when-awaiting-allocation +3 -3
@@ -627,10 +627,10 @@ static void toggle_allocation_gate(struc
 		 * During low activity with no allocations we might wait a
 		 * while; let's avoid the hung task warning.
 		 */
-		wait_event_timeout(allocation_wait, atomic_read(&kfence_allocation_gate),
-				   sysctl_hung_task_timeout_secs * HZ / 2);
+		wait_event_idle_timeout(allocation_wait, atomic_read(&kfence_allocation_gate),
+					sysctl_hung_task_timeout_secs * HZ / 2);
 	} else {
-		wait_event(allocation_wait, atomic_read(&kfence_allocation_gate));
+		wait_event_idle(allocation_wait, atomic_read(&kfence_allocation_gate));
 	}
 
 	/* Disable static key and reset timer. */

_

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

mm-slub-change-run-time-assertion-in-kmalloc_index-to-compile-time-fix.patch printk-introduce-dump_stack_lvl-fix.patch kfence-unconditionally-use-unbound-work-queue.patch kcov-add-__no_sanitize_coverage-to-fix-noinstr-for-all-architectures.patch kcov-add-__no_sanitize_coverage-to-fix-noinstr-for-all-architectures-v2.patch kcov-add-__no_sanitize_coverage-to-fix-noinstr-for-all-architectures-v3.patch