diff --git a/kernel/sched/walt/walt_lb.c b/kernel/sched/walt/walt_lb.c index 9d3ccfa52c06..b4e786f5d713 100644 --- a/kernel/sched/walt/walt_lb.c +++ b/kernel/sched/walt/walt_lb.c @@ -287,6 +287,17 @@ static inline bool need_active_lb(struct task_struct *p, int dst_cpu, if (task_reject_partialhalt_cpu(p, dst_cpu)) return false; + /* + * If the sleeping task on the dst_cpu and the task for which we are + * doing active load balance, are pipeline tasks then don't do active + * load balance. If we allow this, the sleeping task might wakeup + * again on dst_cpu before the migration of actively pulled task. This + * will result in two pipeline tasks on the same cpu + */ + if (walt_pipeline_low_latency_task(p) && + walt_pipeline_low_latency_task(cpu_rq(dst_cpu)->curr)) + return false; + return true; }