Re: [PATCH v2 1/6] sched/cache: Keep nr_pref_llc_running in the runnable domain
From: Peter Zijlstra
Date: Tue Sep 22 2026 - 04:30:41 EST
On Tue, Sep 22, 2026 at 04:25:14PM +0800, Chen, Yu C wrote:
> Hi Peter,
>
> On 9/22/2026 3:22 PM, Peter Zijlstra wrote:
> > On Mon, Sep 21, 2026 at 05:37:22PM -0700, Tim Chen wrote:
> > > @@ -6395,15 +6429,27 @@ static __always_inline void return_cfs_rq_runtime(struct cfs_rq *cfs_rq);
> > > static void set_delayed(struct sched_entity *se)
> > > {
> > > - se->sched_delayed = 1;
> > > -
> > > /*
> > > * Delayed se of cfs_rq have no tasks queued on them.
> > > * Do not adjust h_nr_runnable since __dequeue_task()
> > > * will account it for blocked tasks.
> > > + *
> > > + * This check can be removed because when flat pick
> > > + * patches get merged as only task can get delayed,
> > > + * same for clear_delayed().
> > > */
> > > - if (!entity_is_task(se))
> > > + if (!entity_is_task(se)) {
> > > + se->sched_delayed = 1;
> > > return;
> > > + }
> >
> > This is dead code. In Linus' tree, where this will be applied, this can
> > never happen. A possible backport of this fix however will need to take
> > care.
> >
>
> Would you prefer that we create a separate patch to remove entity_is_task()
> for Linus's tree (so that the current patch can be backported, since
> cache-aware
> scheduling was merged before flat task-pickup)?
Nah, I munged it in with a few changes (I removed that cache-sched.c
file) and it seems to build. See queue.git/sched/urgent.
I'll queue up a patch for sched/core that removes some of that -- if I
don't forget and all that.