mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Aaron Lu" <ziqianlu@bytedance.com>
To: "Wanwu Li" <liwanwu@kylinos.cn>
Cc: "Ingo Molnar" <mingo@redhat.com>,
	 "Peter Zijlstra" <peterz@infradead.org>,
	 "Juri Lelli" <juri.lelli@redhat.com>,
	 "Vincent Guittot" <vincent.guittot@linaro.org>,
	 "Dietmar Eggemann" <dietmar.eggemann@arm.com>,
	 "Steven Rostedt" <rostedt@goodmis.org>,
	 "Ben Segall" <bsegall@google.com>,
	"Mel Gorman" <mgorman@suse.de>,
	 "Valentin Schneider" <vschneid@redhat.com>,
	 "K Prateek Nayak" <kprateek.nayak@amd.com>,
	 <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/2] sched/fair: Use cfs_rq->h_curr in the bandwidth paths
Date: Tue, 1 Sep 2026 10:38:51 +0800	[thread overview]
Message-ID: <20260901023851.GA4059187@bytedance.com> (raw)
In-Reply-To: <20260831101141.391382-1-liwanwu@kylinos.cn>

On Mon, Aug 31, 2026 at 06:11:39PM +0800, Wanwu Li wrote:
> Hi Peter, Ingo,
> 
> Since commit 85570f10a4c6 ("sched/eevdf: Move to a single runqueue")
> the per-level "is something running at this level" information moved
> from cfs_rq->curr to cfs_rq->h_curr; cfs_rq->curr is now only
> maintained on the root cfs_rq. The cgroup hierarchy is kept for load
> tracking and bandwidth accounting, which makes the bandwidth paths the
> only code that still runs per-level and consults a per-level current.
> Two locations were not updated in this conversion:
> 
>   1/2: throttle_cfs_rq() reads cfs_rq->curr to decide whether the
>        throttled level has a running entity. For intermediate cfs_rqs
>        the check is always false, so quota exhaustion never requests a
>        full sched_cfs_bandwidth_slice() and never arms the deferred
>        throttle task_work via task_throttle_setup_work(); a running
>        task can out-run its group's quota until the next pick armed
>        the work instead.
> 
>   2/2: distribute_cfs_runtime() gates its clock refresh and runtime
>        accounting on cfs_rq->curr, which never fires for cgroup
>        cfs_rqs. Since commit 28ad5427682b ("sched/fair: Call
>        update_curr() before unthrottling the hierarchy")
>        unthrottle_cfs_rq() catches up unconditionally, so this is not
>        a correctness hole today, but the refresh the check was written
>        for is gone.

For this series:
Reviewed-by: Aaron Lu <ziqianlu@bytedance.com>

I also run a test where a nop is affined to a single cpu and I can see
that nop task can use more than its quota from time to time; with this
series applied, this no longer happens, so:
Tested-by: Aaron Lu <ziqianlu@bytedance.com>

  parent reply	other threads:[~2026-09-01  2:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-31 10:11 Wanwu Li
2026-08-31 10:11 ` [PATCH 1/2] sched/fair: Use cfs_rq->h_curr in throttle_cfs_rq() Wanwu Li
2026-09-02  7:22   ` [tip: sched/urgent] " tip-bot2 for Wanwu Li
2026-08-31 10:11 ` [PATCH 2/2] sched/fair: Use cfs_rq->h_curr in distribute_cfs_runtime() Wanwu Li
2026-09-02  7:21   ` [tip: sched/urgent] " tip-bot2 for Wanwu Li
2026-09-01  2:38 ` Aaron Lu [this message]
2026-09-01  4:09   ` [PATCH 0/2] sched/fair: Use cfs_rq->h_curr in the bandwidth paths Wanwu Li
2026-09-01  4:09   ` Wanwu Li

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=20260901023851.GA4059187@bytedance.com \
    --to=ziqianlu@bytedance.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=liwanwu@kylinos.cn \
    --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 \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®