Skip to content

Commit

Permalink
Revert "sched/tune: Only force UX tasks to big cores"
Browse files Browse the repository at this point in the history
This reverts commit fbdcaa1.

Signed-off-by: txexcalibur <[email protected]>
  • Loading branch information
txexcalibur committed Jul 17, 2024
1 parent fd4fd85 commit 965a3a9
Showing 1 changed file with 6 additions and 26 deletions.
32 changes: 6 additions & 26 deletions kernel/sched/tune.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,40 +474,18 @@ int schedtune_cpu_boost(int cpu)
return bg->boost_max;
}

static inline int schedtune_adj_ta(struct task_struct *p)
{
struct schedtune *st;
char name_buf[NAME_MAX + 1];
int adj = p->signal->oom_score_adj;

/* We only care about adj == 0 */
if (adj != 0)
return 0;

/* Don't touch kthreads */
if (p->flags & PF_KTHREAD)
return 0;

st = task_schedtune(p);
cgroup_name(st->css.cgroup, name_buf, sizeof(name_buf));
if (!strncmp(name_buf, "top-app", strlen("top-app"))) {
pr_debug("top app is %s with adj %i\n", p->comm, adj);
return 1;
}

return 0;
}

int schedtune_task_boost(struct task_struct *p)
{
struct schedtune *st;
int task_boost;

if (unlikely(!schedtune_initialized))
return 0;

/* Get task boost value */
rcu_read_lock();
task_boost = schedtune_adj_ta(p);
st = task_schedtune(p);
task_boost = st->boost;
rcu_read_unlock();

return task_boost;
Expand All @@ -518,13 +496,15 @@ int schedtune_task_boost(struct task_struct *p)
*/
int schedtune_task_boost_rcu_locked(struct task_struct *p)
{
struct schedtune *st;
int task_boost;

if (unlikely(!schedtune_initialized))
return 0;

/* Get task boost value */
task_boost = schedtune_adj_ta(p);
st = task_schedtune(p);
task_boost = st->boost;

return task_boost;
}
Expand Down

0 comments on commit 965a3a9

Please sign in to comment.