]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
kfence: allow use of a deferrable timer
authorMarco Elver <elver@google.com>
Tue, 22 Mar 2022 21:48:25 +0000 (14:48 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 11:50:49 +0000 (12:50 +0100)
commitb7792fe79fbeae077e3c8bb3f28f6f8420bae63e
tree93c8b9c1d0abd45cbc66d827bcd753d7028c524a
parent0621d2599d6e02d05c85d6bbd58eaea2f15b3503
kfence: allow use of a deferrable timer

[ Upstream commit 737b6a10ac19e41877aa1911bf6b361a72a88ad9 ]

Allow the use of a deferrable timer, which does not force CPU wake-ups
when the system is idle.  A consequence is that the sample interval
becomes very unpredictable, to the point that it is not guaranteed that
the KFENCE KUnit test still passes.

Nevertheless, on power-constrained systems this may be preferable, so
let's give the user the option should they accept the above trade-off.

Link: https://lkml.kernel.org/r/20220308141415.3168078-1-elver@google.com
Signed-off-by: Marco Elver <elver@google.com>
Reviewed-by: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Stable-dep-of: e64f81946adf ("kfence: skip __GFP_THISNODE allocations on NUMA systems")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Documentation/dev-tools/kfence.rst
lib/Kconfig.kfence
mm/kfence/core.c