android_kernel_xiaomi_sm8450/mm/kfence
Marco Elver 71710d40d9 UPSTREAM: 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.

BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1185565
Link: https://lkml.kernel.org/r/20210521083209.3740269-1-elver@google.com
Fixes: 407f1d8c1b5f ("kfence: await for allocation using wait_event")
Signed-off-by: Marco Elver <elver@google.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: David Laight <David.Laight@ACULAB.COM>
Cc: Hillf Danton <hdanton@sina.com>
Cc: <stable@vger.kernel.org>	[5.12+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 8fd0e995cc7b6a7a8a40bc03d52a2cd445beeff4)
Bug: 187129171
Signed-off-by: Connor O'Brien <connoro@google.com>
Change-Id: I837f80e59c11d0322063bac0b2873c25ff528ab6
2021-08-27 12:26:09 -07:00
..
core.c UPSTREAM: kfence: use TASK_IDLE when awaiting allocation 2021-08-27 12:26:09 -07:00
kfence_test.c UPSTREAM: kfence: report sensitive information based on no_hash_pointers 2021-03-01 18:11:05 +01:00
kfence.h UPSTREAM: kfence: report sensitive information based on no_hash_pointers 2021-03-01 18:11:05 +01:00
Makefile FROMGIT: kfence: add test suite 2021-02-05 09:20:54 -08:00
report.c UPSTREAM: kfence: fix reports if constant function prefixes exist 2021-04-29 08:13:57 +02:00