aboutsummaryrefslogtreecommitdiff
path: root/kernel/sched/deadline.c
diff options
context:
space:
mode:
authorGravatar Dietmar Eggemann <dietmar.eggemann@arm.com> 2022-07-29 13:13:03 +0200
committerGravatar Ingo Molnar <mingo@kernel.org> 2022-08-02 12:32:45 +0200
commit740cf8a760b73e8375bfb4bedcbe9746183350f9 (patch)
tree32df6e4db3c83a27fa5738b3fb79fcbecfd3a4fb /kernel/sched/deadline.c
parentMerge tag 'irq-core-2022-08-01' of git://git.kernel.org/pub/scm/linux/kernel/... (diff)
downloadlinux-740cf8a760b73e8375bfb4bedcbe9746183350f9.tar.gz
linux-740cf8a760b73e8375bfb4bedcbe9746183350f9.tar.bz2
linux-740cf8a760b73e8375bfb4bedcbe9746183350f9.zip
sched/core: Introduce sched_asym_cpucap_active()
Create an inline helper for conditional code to be only executed on asymmetric CPU capacity systems. This makes these (currently ~10 and future) conditions a lot more readable. Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20220729111305.1275158-2-dietmar.eggemann@arm.com
Diffstat (limited to 'kernel/sched/deadline.c')
-rw-r--r--kernel/sched/deadline.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 0ab79d819a0d..8bebc36a1b71 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -144,7 +144,7 @@ static inline unsigned long __dl_bw_capacity(int i)
*/
static inline unsigned long dl_bw_capacity(int i)
{
- if (!static_branch_unlikely(&sched_asym_cpucapacity) &&
+ if (!sched_asym_cpucap_active() &&
capacity_orig_of(i) == SCHED_CAPACITY_SCALE) {
return dl_bw_cpus(i) << SCHED_CAPACITY_SHIFT;
} else {
@@ -1849,7 +1849,7 @@ select_task_rq_dl(struct task_struct *p, int cpu, int flags)
* Take the capacity of the CPU into account to
* ensure it fits the requirement of the task.
*/
- if (static_branch_unlikely(&sched_asym_cpucapacity))
+ if (sched_asym_cpucap_active())
select_rq |= !dl_task_fits_capacity(p, cpu);
if (select_rq) {