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@google.com Date: Fri, 21 May 2021 at 10:32 Subject: [PATCH] kfence: use TASK_IDLE when awaiting allocation To: elver@google.com, akpm@linux-foundation.org Cc: glider@google.com, dvyukov@google.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, kasan-dev@googlegroups.com, Mel Gorman mgorman@suse.de, stable@vger.kernel.org
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@google.com Cc: Mel Gorman mgorman@suse.de Cc: stable@vger.kernel.org # v5.12+ --- mm/kfence/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)