Skip to content

Commit

Permalink
sched: add arch_scale_min_freq_capacity to track minimum capacity caps
Browse files Browse the repository at this point in the history
If the minimum capacity of a group is capped by userspace or internal
dependencies which are not otherwise visible to the scheduler, we need
a way to see these and integrate this information into the energy
calculations and task placement decisions we make.

Add arch_scale_min_freq_capacity to determine the lowest capacity which
a specific cpu can provide under the current set of known constraints.

Change-Id: Ied4a1dc0982bbf42cb5ea2f27201d4363db59705
Signed-off-by: Chris Redpath <[email protected]>
Signed-off-by: Ionela Voinescu <[email protected]>
  • Loading branch information
ionela-voinescu authored and Nanhumly committed Aug 23, 2023
1 parent ccd1494 commit e6910e7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions kernel/sched/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -2365,6 +2365,18 @@ unsigned long arch_scale_max_freq_capacity(struct sched_domain *sd, int cpu)
}
#endif

#ifndef arch_scale_min_freq_capacity
static __always_inline
unsigned long arch_scale_min_freq_capacity(struct sched_domain *sd, int cpu)
{
/*
* Multiplied with any capacity value, this scale factor will return
* 0, which represents an un-capped state
*/
return 0;
}
#endif

#ifndef arch_scale_cpu_capacity
static __always_inline
unsigned long arch_scale_cpu_capacity(struct sched_domain *sd, int cpu)
Expand Down

0 comments on commit e6910e7

Please sign in to comment.