Re: [PATCH] sched/fair: Propagate load for throttled cfs_rq
From: Aaron Lu
Date: Tue Sep 09 2025 - 02:27:36 EST
On Tue, Sep 09, 2025 at 11:52:55AM +0530, K Prateek Nayak wrote:
> Hello Aaron,
>
> On 9/9/2025 11:47 AM, Aaron Lu wrote:
> >>>> kernel/sched/fair.c:6747:1: error: expected identifier or '(' before '+' token
> >> 6747 | +static inline bool cfs_rq_pelt_clock_throttled(struct cfs_rq *cfs_rq)
> >> | ^
> >
> > Sigh, I remembered I did a build test with !CFS_BANDWIDTH and now I went
> > to check that build directory and noticed I didn't have CFS_BANDWIDTH
> > disabled...
> >
> > Sorry for the trouble, will send an updated patch later.
>
> While at it, another nit.
>
> On 9/8/2025 4:35 PM, Aaron Lu wrote:
> > @@ -13151,10 +13161,13 @@ static void propagate_entity_cfs_rq(struct sched_entity *se)
> > {
> > struct cfs_rq *cfs_rq = cfs_rq_of(se);
> >
> > - if (cfs_rq_throttled(cfs_rq))
> > - return;
> > -
> > - if (!throttled_hierarchy(cfs_rq))
> > + /*
> > + * If a task gets attached to this cfs_rq and before being queued,
> > + * it gets migrated to another CPU due to reasons like cpuset change,
> > + * we need to make sure this cfs_rq stays on leaf cfs_rq list to
> > + * have that removed load decayed or it can cause faireness problem.
> > + */
> > + if(!cfs_rq_pelt_clock_throttled(cfs_rq))
>
> ^ Can you also add a space after the "if" here.
>
Yeah, I definitely should do that, thanks for catching this.
> > list_add_leaf_cfs_rq(cfs_rq);
>