diff options
author | Qais Yousef <qais.yousef@arm.com> | 2022-08-04 16:36:02 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2022-10-27 11:01:18 +0200 |
commit | b48e16a69792b5dc4a09d6807369d11b2970cc36 (patch) | |
tree | 1ac4a11ec9556bbd1e1435c46ea2e5df17c5cac9 /kernel/sched/sched.h | |
parent | sched/uclamp: Fix relationship between uclamp and migration margin (diff) | |
download | linux-b48e16a69792b5dc4a09d6807369d11b2970cc36.tar.xz linux-b48e16a69792b5dc4a09d6807369d11b2970cc36.zip |
sched/uclamp: Make task_fits_capacity() use util_fits_cpu()
So that the new uclamp rules in regard to migration margin and capacity
pressure are taken into account correctly.
Fixes: a7008c07a568 ("sched/fair: Make task_fits_capacity() consider uclamp restrictions")
Co-developed-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Qais Yousef <qais.yousef@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220804143609.515789-3-qais.yousef@arm.com
Diffstat (limited to 'kernel/sched/sched.h')
-rw-r--r-- | kernel/sched/sched.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index a4a20046e586..0ab091b9d91b 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -3060,6 +3060,15 @@ static inline bool uclamp_is_used(void) return static_branch_likely(&sched_uclamp_used); } #else /* CONFIG_UCLAMP_TASK */ +static inline unsigned long uclamp_eff_value(struct task_struct *p, + enum uclamp_id clamp_id) +{ + if (clamp_id == UCLAMP_MIN) + return 0; + + return SCHED_CAPACITY_SCALE; +} + static inline unsigned long uclamp_rq_util_with(struct rq *rq, unsigned long util, struct task_struct *p) |