diff options
| author | John Stultz <jstultz@google.com> | 2025-07-12 06:33:42 +0300 |
|---|---|---|
| committer | Peter Zijlstra <peterz@infradead.org> | 2025-07-14 18:16:31 +0300 |
| commit | 25c411fce735dda29de26f58d3fce52d4824380c (patch) | |
| tree | 4869c00c94a3a7030ac85f6996d4226da9bcbe94 /include/linux | |
| parent | 8f2146159b3a24d4fde0479c5e19f31908419004 (diff) | |
| download | linux-25c411fce735dda29de26f58d3fce52d4824380c.tar.xz | |
sched: Add CONFIG_SCHED_PROXY_EXEC & boot argument to enable/disable
Add a CONFIG_SCHED_PROXY_EXEC option, along with a boot argument
sched_proxy_exec= that can be used to disable the feature at boot
time if CONFIG_SCHED_PROXY_EXEC was enabled.
Also uses this option to allow the rq->donor to be different from
rq->curr.
Signed-off-by: John Stultz <jstultz@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: K Prateek Nayak <kprateek.nayak@amd.com>
Link: https://lkml.kernel.org/r/20250712033407.2383110-2-jstultz@google.com
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/sched.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 54a91261e99b..f225b6b1baa3 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1656,6 +1656,19 @@ struct task_struct { randomized_struct_fields_end } __attribute__ ((aligned (64))); +#ifdef CONFIG_SCHED_PROXY_EXEC +DECLARE_STATIC_KEY_TRUE(__sched_proxy_exec); +static inline bool sched_proxy_exec(void) +{ + return static_branch_likely(&__sched_proxy_exec); +} +#else +static inline bool sched_proxy_exec(void) +{ + return false; +} +#endif + #define TASK_REPORT_IDLE (TASK_REPORT + 1) #define TASK_REPORT_MAX (TASK_REPORT_IDLE << 1) |
