Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc68b671 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti Committed by Runmin Wang
Browse files

sched/fair: Don't let tasks slip away from gold to silver cluster



We often see a BIG/medium task being migrated from gold cluster to
silver cluster during load balance when the gold CPU has 2 tasks
including this BIG task. For example, BIG task wakes up a binder
and binder preempts and running. At this time, the silver CPU pull
the BIG task since the overall utilization is more. The gold CPU
becomes idle immediately and may not be able to pull the medium
task. It can also happen when a pinned kworker runs on the gold
CPU.

Change-Id: I7d8caad6978bfa93aa3cdd772400e807b9f15e3d
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: default avatarRunmin Wang <runminw@codeaurora.org>
parent 62a4f0ac
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -187,6 +187,7 @@ unsigned int sysctl_sched_min_task_util_for_boost = 51;
/* 0.68ms default for 20ms window size scaled to 1024 */
/* 0.68ms default for 20ms window size scaled to 1024 */
unsigned int sysctl_sched_min_task_util_for_colocation = 35;
unsigned int sysctl_sched_min_task_util_for_colocation = 35;
#endif
#endif
unsigned int sched_small_task_threshold = 102;


static inline void update_load_add(struct load_weight *lw, unsigned long inc)
static inline void update_load_add(struct load_weight *lw, unsigned long inc)
{
{
@@ -9944,7 +9945,9 @@ static struct rq *find_busiest_queue(struct lb_env *env,
		 */
		 */
		if (env->sd->flags & SD_ASYM_CPUCAPACITY &&
		if (env->sd->flags & SD_ASYM_CPUCAPACITY &&
		    capacity_of(env->dst_cpu) < capacity &&
		    capacity_of(env->dst_cpu) < capacity &&
		    rq->nr_running == 1)
		    (rq->nr_running == 1 ||
			 (rq->nr_running == 2 && task_util(rq->curr) <
			  sched_small_task_threshold)))
			continue;
			continue;


		wl = weighted_cpuload(rq);
		wl = weighted_cpuload(rq);