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

Commit 916e703d authored by Pavankumar Kondeti's avatar Pavankumar Kondeti Committed by Lingutla Chandrasekhar
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>
parent 8b40f5ec
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -169,6 +169,7 @@ unsigned int sysctl_sched_capacity_margin_down = 1205; /* ~15% margin */
#ifdef CONFIG_SCHED_WALT
unsigned int sysctl_sched_min_task_util_for_boost_colocation;
#endif
static unsigned int __maybe_unused sched_small_task_threshold = 102;

static inline void update_load_add(struct load_weight *lw, unsigned long inc)
{
@@ -9878,7 +9879,8 @@ static struct rq *find_busiest_queue(struct lb_env *env,
		 */
		if (env->sd->flags & SD_ASYM_CPUCAPACITY &&
		    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;

		wl = weighted_cpuload(i);