sched/cass: No thermal throttling for us

Change-Id: If892e9c33656b7f829d2adb3d7228ac12313dd2c
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This commit is contained in:
Alexander Winkowski 2024-04-05 18:38:50 +00:00 committed by Richard Raya
parent c631cde2a8
commit 7e8a73c333

View File

@ -30,8 +30,6 @@ struct cass_cpu_cand {
unsigned int exit_lat;
unsigned long cap;
unsigned long cap_max;
unsigned long cap_no_therm;
unsigned long cap_orig;
unsigned long eff_util;
unsigned long hard_util;
unsigned long util;
@ -72,9 +70,6 @@ void cass_cpu_util(struct cass_cpu_cand *c, int this_cpu, bool sync)
* CFS and RT tasks when CASS selects a CPU for them.
*/
c->cap = c->cap_max - min(c->hard_util, c->cap_max - 1);
/* Get the current capacity with thermal pressure excluded */
c->cap_no_therm = c->cap_orig - min(c->hard_util, c->cap_orig - 1);
}
/* Returns true if @a is a better CPU than @b */
@ -171,10 +166,7 @@ static int cass_best_cpu(struct task_struct *p, int prev_cpu, bool sync, bool rt
struct rq *rq = cpu_rq(cpu);
/* Get the original, maximum _possible_ capacity of this CPU */
curr->cap_orig = arch_scale_cpu_capacity(NULL, cpu);
/* Get the _current_, throttled maximum capacity of this CPU */
curr->cap_max = curr->cap_orig - thermal_load_avg(rq);
curr->cap_max = arch_scale_cpu_capacity(NULL, cpu);
/* Prefer the CPU that more closely meets the uclamp minimum */
if (curr->cap_max < uc_min && curr->cap_max < best->cap_max)
@ -253,7 +245,7 @@ static int cass_best_cpu(struct task_struct *p, int prev_cpu, bool sync, bool rt
* disproportionate P-states.
*/
curr->util =
curr->util * SCHED_CAPACITY_SCALE / curr->cap_no_therm;
curr->util * SCHED_CAPACITY_SCALE / curr->cap;
/*
* Check if this CPU is better than the best CPU found so far.