mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Juri Lelli <juri.lelli@redhat.com>
Cc: luca abeni <luca.abeni@santannapisa.it>,
	Yuri Andriaccio <yurand2000@gmail.com>,
	bsegall@google.com, cgroups@vger.kernel.org,
	dietmar.eggemann@arm.com, hannes@cmpxchg.org,
	kprateek.nayak@amd.com, linux-kernel@vger.kernel.org,
	mgorman@suse.de, mingo@redhat.com, mkoutny@suse.com,
	peterz@infradead.org, rostedt@goodmis.org,
	vincent.guittot@linaro.org, vschneid@redhat.com,
	yuri.andriaccio@santannapisa.it
Subject: Re: [RFC PATCH v7 00/29] Hierarchical Constant Bandwidth Server
Date: Fri, 27 Nov 2026 16:05:10 -1000	[thread overview]
Message-ID: <c9eeab238a98617755772b8030109a31@kernel.org> (raw)
In-Reply-To: <awfe_r5McCTzr84x@jlelli-thinkpadt14gen4.remote.csb>

Hello, Juri.

On Thu, Nov 26, 2026 at 08:25:50AM +0100, Juri Lelli wrote:
>   P/          cpuset.cpus=0-10
>               cpu.rt.max: 4-10 runtime=400 period=1000
>   P/noncrit   cpuset.cpus=0-3   (threaded, no cpu.rt.max entries)
>   P/crit      cpuset.cpus=4-10  (threaded, no cpu.rt.max entries)
...
> Tejun, is this the kind of usage you had in mind?

Yes, and let me build on it a bit because I think it also shows why
tying cpu.rt.max to cpuset is problematic.

Here, cpuset is what keeps the two sets of threads apart, but cpuset
isn't just for RT tasks. Say the process also has normal threads which
should be able to run anywhere on 0-10. The two children can't carry
different cpusets then. The RT threads would be affined instead and
crit would carry the budget so that only its threads use it:

  P/            cpuset.cpus=0-10
                cpu.rt.max: 4-10 runtime=400 period=1000
  P/noncrit     RT threads affined to 0-3
  P/crit        cpu.rt.max: 4-10 runtime=400 period=1000
                RT threads affined to 4-10

cpuset confines everything in P, RT or not, to 0-10 and cpu.rt.max
says where the RT budget is. crit takes all of P's budget on 4-10, so
the noncrit threads have nothing to run on there and stay on 0-3. If
the budget followed cpuset, it gets tricky to express the restrictions
for the normal threads.

Now, say P sits under S and a second container Q is added next to it,
sharing 8-10 with P:

  S/            cpu.rt.max: 4-14 runtime=500 period=1000
  S/P/          cpuset.cpus=0-10
                cpu.rt.max: 4-7 runtime=400 period=1000
                            8-10 runtime=200 period=1000
  S/P/noncrit   RT threads affined to 0-3
  S/P/crit      cpu.rt.max: 4-7 runtime=400 period=1000
                            8-10 runtime=200 period=1000
                RT threads affined to 4-10
  S/Q/          cpu.rt.max: 8-10 runtime=200 period=1000
                            11-14 runtime=400 period=1000

P and Q each have 200 out of S's 500 on 8-10 and 400 on the CPUs they
don't share. Nothing has an entry on 0-3 and the noncrit threads run
there as before. P and crit now need different budgets on different
CPUs, so expressing partial sharing takes full per-CPU config anyway.

I'm not familiar with the analysis side, but wouldn't it be okay for
the guarantees to come with conditions? e.g. If the crit threads stay
affined to 4-10, they get the budgets crit has there. A thread which
doesn't follow the setup gets whatever is left where it runs, which
may be nothing, as with a noncrit thread on 4-10 above.

I think something like this, per-CPU and independent of cpuset, is the
most orthogonal. Intertwining configs across controllers or CPUs is
likely to lead to complications in the future, many of which we can't
foresee now.

Thanks.

--
tejun

  parent reply	other threads:[~2026-11-28  2:05 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-09 16:35 Yuri Andriaccio
2026-11-09 16:35 ` [RFC PATCH v7 01/29] sched/deadline: Introduce dl_freq_invariant flag for fair/ext servers Yuri Andriaccio
2026-11-09 16:35 ` [RFC PATCH v7 02/29] sched/deadline: Do not access dl_se->rq directly Yuri Andriaccio
2026-11-09 16:35 ` [RFC PATCH v7 03/29] sched/deadline: Distinguish between dl_rq and my_q Yuri Andriaccio
2026-11-09 16:35 ` [RFC PATCH v7 04/29] sched/rt: Pass an rt_rq instead of an rq where needed Yuri Andriaccio
2026-11-09 16:35 ` [RFC PATCH v7 05/29] sched/rt: Move functions from rt.c to sched.h Yuri Andriaccio
2026-11-09 16:35 ` [RFC PATCH v7 06/29] sched/rt: Disable RT_GROUP_SCHED Yuri Andriaccio
2026-11-09 16:35 ` [RFC PATCH v7 07/29] sched/rt: Remove unnecessary runqueue pointer in struct rt_rq Yuri Andriaccio
2026-11-09 16:35 ` [RFC PATCH v7 08/29] sched/rt: Introduce HCBS specific structs in task_group Yuri Andriaccio
2026-11-09 16:35 ` [RFC PATCH v7 09/29] sched/core: Initialize HCBS specific structures Yuri Andriaccio
2026-11-09 16:35 ` [RFC PATCH v7 10/29] sched/deadline: Add dl_init_tg Yuri Andriaccio
2026-11-09 16:35 ` [RFC PATCH v7 11/29] sched/rt: Add {alloc/unregister/free}_rt_sched_group Yuri Andriaccio
2026-11-09 16:35 ` [RFC PATCH v7 12/29] sched/deadline: Account rt-cgroups bandwidth in deadline tasks schedulability tests Yuri Andriaccio
2026-11-09 16:35 ` [RFC PATCH v7 13/29] sched/rt: Implement dl-server operations for rt-cgroups Yuri Andriaccio
2026-11-09 16:36 ` [RFC PATCH v7 14/29] sched/rt: Update task event callbacks for HCBS scheduling Yuri Andriaccio
2026-11-09 16:36 ` [RFC PATCH v7 15/29] sched/rt: Remove support for cgroups-v1 Yuri Andriaccio
2026-11-09 16:36 ` [RFC PATCH v7 16/29] sched/rt: Update rt-cgroup schedulability checks Yuri Andriaccio
2026-11-09 16:36 ` [RFC PATCH v7 17/29] sched/rt: Update task's RT runqueue when switching scheduling class Yuri Andriaccio
2026-11-09 16:36 ` [RFC PATCH v7 18/29] sched/rt: Remove old RT_GROUP_SCHED data structures Yuri Andriaccio
2026-11-09 16:36 ` [RFC PATCH v7 19/29] sched/rt: Add HCBS migration code to related functions Yuri Andriaccio
2026-11-09 16:36 ` [RFC PATCH v7 20/29] sched/rt: Hook HCBS migration functions Yuri Andriaccio
2026-11-09 16:36 ` [RFC PATCH v7 21/29] sched/core: Execute enqueued balance callbacks when changing allowed CPUs Yuri Andriaccio
2026-11-09 16:36 ` [RFC PATCH v7 22/29] sched/rt: Try pull task on empty server pick Yuri Andriaccio
2026-11-09 16:36 ` [RFC PATCH v7 23/29] sched/core: Execute enqueued balance callbacks after migrate_disable_switch Yuri Andriaccio
2026-11-09 16:36 ` [RFC PATCH v7 24/29] sched/syscalls: Allow unpriviledged tasks to set RT priority inside cgroups Yuri Andriaccio
2026-11-09 16:36 ` [RFC PATCH v7 25/29] sched/rt: Enable HRTICK_DL for HCBS servers Yuri Andriaccio
2026-11-09 16:36 ` [RFC PATCH v7 26/29] Documentation: Update documentation for real-time cgroups Yuri Andriaccio
2026-11-09 16:36 ` [RFC PATCH v7 27/29] sched/rt: Integrate cpuset and cpu controllers Yuri Andriaccio
2026-11-09 16:36 ` [RFC PATCH v7 28/29] sched/rt: Prevent CPU offline operation on active rt-cgroups Yuri Andriaccio
2026-11-09 16:36 ` [RFC PATCH v7 29/29] sched/rt: Introduce multi-cpu support Yuri Andriaccio
2026-11-10 21:43 ` [RFC PATCH v7 00/29] Hierarchical Constant Bandwidth Server Tejun Heo
2026-11-11 17:56   ` Yuri Andriaccio
2026-11-17 15:49     ` Juri Lelli
2026-11-18  8:07     ` Tejun Heo
2026-11-19 11:23       ` Juri Lelli
2026-11-19 14:27         ` luca abeni
2026-11-19 14:36           ` Juri Lelli
2026-11-19 14:42             ` luca abeni
2026-11-19 14:14       ` luca abeni
2026-11-20  6:46         ` Tejun Heo
2026-11-20 11:06           ` luca abeni
2026-11-20 11:55             ` Tejun Heo
2026-11-20 20:24               ` luca abeni
2026-11-21 17:24                 ` Tejun Heo
2026-11-23  7:43                   ` luca abeni
2026-11-23 10:22                     ` Juri Lelli
2026-11-23 14:18                       ` luca abeni
2026-11-26  7:25                         ` Juri Lelli
2026-11-26  7:43                           ` luca abeni
2026-11-26  7:49                             ` Juri Lelli
2026-11-26  7:58                               ` luca abeni
2026-11-26  8:02                                 ` Juri Lelli
2026-11-26 14:57                           ` luca abeni
2026-11-26 16:33                             ` Juri Lelli
2026-11-27 14:26                               ` luca abeni
2026-11-28  2:05                           ` Tejun Heo [this message]
2026-11-27 11:48                       ` Peter Zijlstra
2026-11-27 14:35                         ` Juri Lelli
2026-11-27 15:09                         ` luca abeni
2026-11-16 14:25 ` Juri Lelli
2026-11-17 13:00   ` Yuri Andriaccio

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=c9eeab238a98617755772b8030109a31@kernel.org \
    --to=tj@kernel.org \
    --cc=bsegall@google.com \
    --cc=cgroups@vger.kernel.org \
    --cc=dietmar.eggemann@arm.com \
    --cc=hannes@cmpxchg.org \
    --cc=juri.lelli@redhat.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luca.abeni@santannapisa.it \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=mkoutny@suse.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    --cc=yurand2000@gmail.com \
    --cc=yuri.andriaccio@santannapisa.it \
    /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®