All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kayra Cizmeci <kayracizmeci@gmail.com>
To: Chuyi Zhou <zhouchuyi@bytedance.com>
Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
	 vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
	rostedt@goodmis.org,  bsegall@google.com, mgorman@suse.de,
	vschneid@redhat.com, kprateek.nayak@amd.com,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched/fair: Use the task's cfs_rq for PELT on delayed wakeup
Date: Fri, 4 Dec 2026 21:02:17 +0300	[thread overview]
Message-ID: <axK7kZVYLh2o7mrL@scheduler.schedules> (raw)
In-Reply-To: <20261204122046.2745532-1-zhouchuyi@bytedance.com>

Hi Chuyi,

On Fri, Dec 04, 2026 at 08:20:46PM +0800, Chuyi Zhou wrote:
> A task's PELT averages are tracked on its group's cfs_rq. With CFS
> bandwidth control, that runqueue's PELT clock excludes time spent
> throttled.
> 
> When a task marked for delayed dequeue wakes up, requeue_delayed_entity()
> uses the root cfs_rq for EEVDF placement and also passes it to
> update_load_avg(). If the group was previously throttled, the root clock
> can advance the task's last_update_time past the group clock. The next
> update on the group clock can then see a negative delta and reset the
> timestamp without accumulating load.
> 
> Pass the task's cfs_rq to update_load_avg() on delayed wakeup.
> 
> Fixes: 85570f10a4c6 ("sched/eevdf: Move to a single runqueue")
> Signed-off-by: Chuyi Zhou <zhouchuyi@bytedance.com>
> ---
>  kernel/sched/fair.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 2d9d3d686261..40b8f96b6b4a 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -8142,7 +8142,7 @@ requeue_delayed_entity(struct cfs_rq *cfs_rq, struct sched_entity *se)
>  		cfs_rq->h_nr_queued++;
>  	}
>  
> -	update_load_avg(cfs_rq, se, 0);
> +	update_load_avg(cfs_rq_of(se), se, 0);
>  	clear_delayed(se);
>  }
>  
> -- 
> 2.20.1

:-)

Makes sense.

Reviewed-by: Kayra Cizmeci <kayracizmeci@gmail.com>


Thanks!

Kayra



  reply	other threads:[~2026-12-04 18:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 12:20 [PATCH] sched/fair: Use the task's cfs_rq for PELT on delayed wakeup Chuyi Zhou
2026-12-04 18:02 ` Kayra Cizmeci [this message]
2026-12-04 23:33 ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=axK7kZVYLh2o7mrL@scheduler.schedules \
    --to=kayracizmeci@gmail.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    --cc=zhouchuyi@bytedance.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.