[5.12.y] kfence: use TASK_IDLE when awaiting allocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear stable maintainers,

The patch "kfence: use TASK_IDLE when awaiting allocation" has landed
in mainline as 8fd0e995cc7b, however, does not apply cleanly to 5.12.y
due to a prerequisite patch missing.

My recommendation is to cherry-pick the following 2 commits to 5.12.y
(rather than rebase 8fd0e995cc7b on top of 5.12.y):

  37c9284f6932 kfence: maximize allocation wait timeout duration
  8fd0e995cc7b kfence: use TASK_IDLE when awaiting allocation

Many thanks,
-- Marco

---------- Forwarded message ---------
From: Marco Elver <elver@xxxxxxxxxx>
Date: Fri, 21 May 2021 at 10:32
Subject: [PATCH] kfence: use TASK_IDLE when awaiting allocation
To: <elver@xxxxxxxxxx>, <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: <glider@xxxxxxxxxx>, <dvyukov@xxxxxxxxxx>,
<linux-kernel@xxxxxxxxxxxxxxx>, <linux-mm@xxxxxxxxx>,
<kasan-dev@xxxxxxxxxxxxxxxx>, Mel Gorman <mgorman@xxxxxxx>,
<stable@xxxxxxxxxxxxxxx>


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.

BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1185565
Fixes: 407f1d8c1b5f ("kfence: await for allocation using wait_event")
Signed-off-by: Marco Elver <elver@xxxxxxxxxx>
Cc: Mel Gorman <mgorman@xxxxxxx>
Cc: <stable@xxxxxxxxxxxxxxx> # v5.12+
---
 mm/kfence/core.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux