mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 11:37:06 +02:00
sched/walt: Add small task filtering to uclamp
Currently, small tasks get placed on mid-cap CPUs if uclamp is active on them. This causes power numbers to increase. Introduce filtering such that small tasks stay on silver. Change-Id: I7e31d8a5ffd4c4f64d7bd3668970216550d23d24 Signed-off-by: Sai Harshini Nimmala <snimmala@codeaurora.org>
This commit is contained in:
parent
4dfdcf521a
commit
a822c7ebe1
|
|
@ -478,6 +478,13 @@ static inline enum sched_boost_policy task_boost_policy(struct task_struct *p)
|
|||
return policy;
|
||||
}
|
||||
|
||||
static inline bool walt_uclamp_boosted(struct task_struct *p)
|
||||
{
|
||||
struct walt_task_struct *wts = (struct walt_task_struct *) p->android_vendor_data1;
|
||||
|
||||
return uclamp_eff_value(p, UCLAMP_MIN) > 0 && wts->unfilter;
|
||||
}
|
||||
|
||||
static inline unsigned long capacity_of(int cpu)
|
||||
{
|
||||
return cpu_rq(cpu)->cpu_capacity;
|
||||
|
|
@ -702,7 +709,7 @@ static inline bool task_fits_max(struct task_struct *p, int cpu)
|
|||
if (is_min_capacity_cpu(cpu)) {
|
||||
if (task_boost_policy(p) == SCHED_BOOST_ON_BIG ||
|
||||
task_boost > 0 ||
|
||||
uclamp_boosted(p) ||
|
||||
walt_uclamp_boosted(p) ||
|
||||
walt_should_kick_upmigrate(p, cpu))
|
||||
return false;
|
||||
} else { /* mid cap cpu */
|
||||
|
|
|
|||
|
|
@ -514,7 +514,7 @@ int walt_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);
|
||||
bool uclamp_boost = uclamp_boosted(p);
|
||||
bool uclamp_boost = walt_uclamp_boosted(p);
|
||||
int start_cpu, order_index, end_index;
|
||||
|
||||
if (walt_is_many_wakeup(sibling_count_hint) && prev_cpu != cpu &&
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user