kernel: sched: merge changes from LA.UM.9.12.R2.10.00.00.685.011
56acc710a6
This commit is contained in:
parent
20053398a9
commit
3d6af0d7a9
@ -1239,8 +1239,17 @@ static void uclamp_fork(struct task_struct *p)
|
||||
return;
|
||||
|
||||
for_each_clamp_id(clamp_id) {
|
||||
uclamp_se_set(&p->uclamp_req[clamp_id],
|
||||
uclamp_none(clamp_id), false);
|
||||
unsigned int clamp_value = uclamp_none(clamp_id);
|
||||
|
||||
/* By default, RT tasks always get 100% boost */
|
||||
if (sched_feat(SUGOV_RT_MAX_FREQ) &&
|
||||
unlikely(rt_task(p) &&
|
||||
clamp_id == UCLAMP_MIN)) {
|
||||
|
||||
clamp_value = uclamp_none(UCLAMP_MAX);
|
||||
}
|
||||
|
||||
uclamp_se_set(&p->uclamp_req[clamp_id], clamp_value, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -446,7 +446,12 @@ static unsigned long sugov_get_util(struct sugov_cpu *sg_cpu)
|
||||
{
|
||||
struct rq *rq = cpu_rq(sg_cpu->cpu);
|
||||
|
||||
#ifdef CONFIG_SCHED_TUNE
|
||||
unsigned long util_cfs = cpu_util_cfs(rq);
|
||||
#else
|
||||
unsigned long util_cfs = cpu_util_freq(sg_cpu->cpu, NULL)
|
||||
- cpu_util_rt(rq);
|
||||
#endif
|
||||
unsigned long max = arch_scale_cpu_capacity(NULL, sg_cpu->cpu);
|
||||
|
||||
sg_cpu->max = max;
|
||||
|
@ -6763,7 +6763,7 @@ static inline int select_idle_sibling_cstate_aware(struct task_struct *p,
|
||||
goto next;
|
||||
|
||||
/* figure out if the task can fit here at all */
|
||||
new_usage = boosted_task_util(p);
|
||||
new_usage = uclamp_task(p);
|
||||
capacity_orig = capacity_orig_of(i);
|
||||
|
||||
if (new_usage > capacity_orig)
|
||||
@ -7034,8 +7034,8 @@ static void find_best_target(struct sched_domain *sd, cpumask_t *cpus,
|
||||
unsigned long best_active_util = ULONG_MAX;
|
||||
unsigned long best_active_cuml_util = ULONG_MAX;
|
||||
unsigned long best_idle_cuml_util = ULONG_MAX;
|
||||
bool prefer_idle = schedtune_prefer_idle(p);
|
||||
bool boosted;
|
||||
bool prefer_idle = uclamp_latency_sensitive(p);
|
||||
bool boosted = fbt_env->boosted;
|
||||
/* Initialise with deepest possible cstate (INT_MAX) */
|
||||
unsigned long best_idle_util = ULONG_MAX;
|
||||
int shallowest_idle_cstate = INT_MAX;
|
||||
@ -7878,7 +7878,7 @@ static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu,
|
||||
u64 start_t = 0;
|
||||
int delta = 0;
|
||||
int task_boost = per_task_boost(p);
|
||||
int boosted = (schedtune_task_boost(p) > 0) || (task_boost > 0);
|
||||
int boosted = uclamp_boosted(p);
|
||||
int start_cpu = get_start_cpu(p, sync_boost);
|
||||
|
||||
if (start_cpu < 0)
|
||||
@ -8081,7 +8081,7 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f
|
||||
cpu_rq(cpu)->rd->max_cap_orig_cpu;
|
||||
bool sync_boost = sync && cpu >= high_cap_cpu;
|
||||
|
||||
if (uclamp_latency_sensitive(p) && !sched_feat(EAS_PREFER_IDLE) && !sync)
|
||||
if (uclamp_latency_sensitive(p) && !sched_feat(EAS_PREFER_IDLE) && !sync)
|
||||
goto sd_loop;
|
||||
|
||||
new_cpu = find_energy_efficient_cpu(p, prev_cpu, sync,
|
||||
@ -10870,14 +10870,9 @@ static int load_balance(int this_cpu, struct rq *this_rq,
|
||||
.loop = 0,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_SCHED_WALT
|
||||
env.prefer_spread = (idle != CPU_NOT_IDLE &&
|
||||
prefer_spread_on_idle(this_cpu) &&
|
||||
env.prefer_spread = (prefer_spread_on_idle(this_cpu) &&
|
||||
!((sd->flags & SD_ASYM_CPUCAPACITY) &&
|
||||
!is_asym_cap_cpu(this_cpu)));
|
||||
#else
|
||||
env.prefer_spread = false;
|
||||
#endif
|
||||
|
||||
cpumask_and(cpus, sched_domain_span(sd), cpu_active_mask);
|
||||
|
||||
|
@ -2692,6 +2692,9 @@ enum schedutil_type {
|
||||
ENERGY_UTIL,
|
||||
};
|
||||
|
||||
unsigned long schedutil_freq_util(int cpu, unsigned long util,
|
||||
unsigned long max, enum schedutil_type type);
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
static inline unsigned long cpu_util_cfs(struct rq *rq)
|
||||
{
|
||||
@ -3160,11 +3163,10 @@ static inline bool is_min_capacity_cpu(int cpu)
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline int asym_cap_siblings(int cpu1, int cpu2) { return 0; }
|
||||
|
||||
static inline bool is_asym_cap_cpu(int cpu) { return false; }
|
||||
|
||||
static inline int asym_cap_siblings(int cpu1, int cpu2) { return 0; }
|
||||
|
||||
static inline bool asym_cap_sibling_group_has_capacity(int dst_cpu, int margin)
|
||||
{
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user