From 965a3a9fc2654e8b6b97a63c1f5da144fbf65f33 Mon Sep 17 00:00:00 2001 From: txexcalibur Date: Wed, 17 Jul 2024 21:10:34 +0530 Subject: [PATCH] Revert "sched/tune: Only force UX tasks to big cores" This reverts commit fbdcaa14d3bb9baecc2137887c7e33f3c8b80309. Signed-off-by: txexcalibur --- kernel/sched/tune.c | 32 ++++++-------------------------- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/kernel/sched/tune.c b/kernel/sched/tune.c index 017d09390689..eb1e70a6a667 100644 --- a/kernel/sched/tune.c +++ b/kernel/sched/tune.c @@ -474,32 +474,9 @@ 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)) @@ -507,7 +484,8 @@ int schedtune_task_boost(struct task_struct *p) /* 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; @@ -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; }