Skip to content
Commit 6f63904c authored by Andrei Vagin's avatar Andrei Vagin Committed by Kees Cook
Browse files

sched: add a few helpers to wake up tasks on the current cpu



Add complete_on_current_cpu, wake_up_poll_on_current_cpu helpers to wake
up tasks on the current CPU.

These two helpers are useful when the task needs to make a synchronous context
switch to another task. In this context, synchronous means it wakes up the
target task and falls asleep right after that.

One example of such workloads is seccomp user notifies. This mechanism allows
the  supervisor process handles system calls on behalf of a target process.
While the supervisor is handling an intercepted system call, the target process
will be blocked in the kernel, waiting for a response to come back.

On-CPU context switches are much faster than regular ones.

Signed-off-by: default avatarAndrei Vagin <avagin@google.com>
Acked-by: default avatar"Peter Zijlstra (Intel)" <peterz@infradead.org>
Link: https://lore.kernel.org/r/20230308073201.3102738-4-avagin@google.com


Signed-off-by: default avatarKees Cook <keescook@chromium.org>
parent ab83f455
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment