Re: [PATCH v2 08/10] sched/fair: Add newidle balance to pick_task_fair()
From: Aaron Lu
Date: Thu Jun 11 2026 - 22:20:11 EST
Hi Peter,
On Thu, Jun 11, 2026 at 01:32:19PM +0200, Peter Zijlstra wrote:
>
> Aaron,
>
> Sorry I failed to notice this email earlier.
>
Never mind.
> On Wed, Jun 03, 2026 at 05:51:08PM +0800, Aaron Lu wrote:
>
> > I applied below diff and the problem is gone:
> >
> > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> > index 5f48af700fd44..942a543af3e54 100644
> > --- a/kernel/sched/fair.c
> > +++ b/kernel/sched/fair.c
> > @@ -9897,6 +9897,9 @@ static struct task_struct *pick_task_fair(struct rq *rq, struct rq_flags *rf)
> > return p;
> >
> > idle:
> > + if (sched_core_enabled(rq))
> > + return NULL;
> > +
> > new_tasks = sched_balance_newidle(rq, rf);
> > if (new_tasks < 0)
> > return RETRY_TASK;
> >
>
> Right, this is the safe patch and restores pick_task_fair() to its
> previous status (for core-sched).
>
> Since people are hitting this problem, I'm going to merge it as below.
> I've presumed your SoB, please let me know if that's a problem.
No problem.
>
> I think I'm going to try and move newidle into sched_class::balance /
> balance_fair(), but I'll do that next cycle.
I'll surely test it then.
Best regards,
Aaron