sched: add WF_CURRENT_CPU and externise ttwu
authorPeter Oskolkov <posk@google.com>
Wed, 8 Mar 2023 07:31:57 +0000 (23:31 -0800)
committerKees Cook <keescook@chromium.org>
Mon, 17 Jul 2023 23:08:08 +0000 (16:08 -0700)
commitab83f455f04df5b2f7c6d4de03b6d2eaeaa27b8a
tree7cd231764749291cd6cdd701065bdb2b6700aba8
parent4943b66df18a0e8aedd006792ed73257cd2da8f8
sched: add WF_CURRENT_CPU and externise ttwu

Add WF_CURRENT_CPU wake flag that advices the scheduler to
move the wakee to the current CPU. This is useful for fast on-CPU
context switching use cases.

In addition, make ttwu external rather than static so that
the flag could be passed to it from outside of sched/core.c.

Signed-off-by: Peter Oskolkov <posk@google.com>
Signed-off-by: Andrei Vagin <avagin@google.com>
Acked-by: "Peter Zijlstra (Intel)" <peterz@infradead.org>
Link: https://lore.kernel.org/r/20230308073201.3102738-3-avagin@google.com
Signed-off-by: Kees Cook <keescook@chromium.org>
kernel/sched/core.c
kernel/sched/fair.c
kernel/sched/sched.h