]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
sched: Minimise repeated sched_proxy_exec() checking
authorJohn Stultz <jstultz@google.com>
Tue, 24 Mar 2026 19:13:17 +0000 (19:13 +0000)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 3 Apr 2026 12:23:38 +0000 (14:23 +0200)
commit37341ec573da7c16fdd45222b1bfb7b421dbdbcb
tree18eed18325c60cc2ce482c19eaf1c4fcef18f199
parente0ca8991b2de6c9dfe6fcd8a0364951b2bd56797
sched: Minimise repeated sched_proxy_exec() checking

Peter noted: Compilers are really bad (as in they utterly refuse)
optimizing (even when marked with __pure) the static branch
things, and will happily emit multiple identical in a row.

So pull out the one obvious sched_proxy_exec() branch in
__schedule() and remove some of the 'implicit' ones in that
path.

Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: John Stultz <jstultz@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: K Prateek Nayak <kprateek.nayak@amd.com>
Link: https://patch.msgid.link/20260324191337.1841376-3-jstultz@google.com
kernel/sched/core.c