mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org,
	rcu@vger.kernel.org, linux-doc@vger.kernel.org
Cc: "Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Shuah Khan" <skhan@linuxfoundation.org>,
	"Randy Dunlap" <rdunlap@infradead.org>,
	"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>,
	"luca abeni" <luca.abeni@santannapisa.it>,
	"Yuri Andriaccio" <yurand2000@gmail.com>,
	"Yuri Andriaccio" <yuri.andriaccio@santannapisa.it>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	"Frederic Weisbecker" <frederic@kernel.org>,
	"Neeraj Upadhyay" <neeraj.upadhyay@kernel.org>,
	"Joel Fernandes" <joelagnelf@nvidia.com>,
	"Josh Triplett" <josh@joshtriplett.org>,
	"Boqun Feng" <boqun@kernel.org>,
	"Uladzislau Rezki" <urezki@gmail.com>,
	"Mathieu Desnoyers" <mathieu.desnoyers@efficios.com>,
	"Lai Jiangshan" <jiangshanlai@gmail.com>,
	Zqiang <qiang.zhang@linux.dev>,
	"Davidlohr Bueso" <dave@stgolabs.net>,
	"Tejun Heo" <tj@kernel.org>,
	"Johannes Weiner" <hannes@cmpxchg.org>,
	"Michal Koutný" <mkoutny@suse.com>,
	"Qais Yousef" <qyousef@layalina.io>,
	"John Ogness" <john.ogness@linutronix.de>
Subject: [PATCH v3 0/8] sched: RT throttling cleanup and a bit of documentation
Date: Fri, 13 Nov 2026 11:50:21 +0100	[thread overview]
Message-ID: <20261113-sched_dl-v3-0-a76ffa1cdeee@linutronix.de> (raw)

People used to disable the RT throttling mechanism by writing -1 to
/proc/sys/kernel/sched_rt_runtime_us. Since v6.12 they can still do this
but they don't disable RT throttling anymore. Instead this throttling
mechanism has been taken over by the fair_server which can be configured
via debugfs.
This is not really documented by a hint appeared a few cycles later in
Documentation/scheduler/sched-rt-group.rst. This can be found once you
know what you are looking for because this document describes the RT
group scheduling (CONFIG_RT_GROUP_SCHED). The fair_server is used even
without it.
The then there is global DL resource control which also shares this
file proc file (which is stuck if CONFIG_RT_GROUP_SCHED is enabled).

This little series:
- Make sure the fair_serve configuration can only be changed while the
  CPU is active. Mathieu tries to fix this and allow it instead. That
  would be an alternative.

- Marks CONFIG_RT_GROUP_SCHED as broken because I was not allowed to
  remove it.

- Untangles DL usage of sched_rt_runtime_us and moves it to
    /sys/kernel/sched/dl_period_us
    /sys/kernel/sched/dl_runtime_us

  This keeps the _us sematic that we used to have /proc. It _could_ be
  changed to ns instead. Or replaced with a per-CPU/RQ setting if this
  is simpler/ preferred on the DL side.

- Moves rcutorture away from the procfs interface since it tries to
  shutdown the fair_server for its testing.

- Adds sysfs interface under /sys/kernel/sched/cpuX to represent the
  runqueues. The only knob for now is fair_server_{period|runtime}
  representing the fair_server parameters. If all goes well, debugfs
  could be removed. The ext server could be moved, too.

- I tried to correct/ update documentation while at it. I added the -doc
  folks on Cc so they are aware. I can drop them in the next posting, I
  expect that this gets routed via the sched/-tip.

v2…v3: https://patch.msgid.link/20261110-sched_dl-v2-0-cc9399f7aeb1@linutronix.de
  - Corrected in wording sched-rt-group.rst (Pointed out by Randy)
  - RCU-torture now disables the fair_server from its boost-thread. The
    code expects the CPU to be active which is after the CPU-hotplug
    notifier is run. An alternative would be to not start the
    fair_server (in the RCU-torture built-in case).
  - sched_dl_try_boundary() has now a private mutex to perform the
    update. sashiko complains that the values are read outside of
    sched_domains_mutex and written back while it is held, making it
    possible to write stale period/ runtime values back.
  - proper u64 casting for NSEC_PER_USEC multiplication.
  - sysfs_dl_runtime is not static and accessed in
    dl_bandwidth_enabled(). This was missed earlier.
    The remaining sysctl_sched_rt_{runtime|period} are now also hidden
    behind CONFIG_RT_GROUP_SCHED.

v1…v2: https://lore.kernel.org/all/20261105164724.yxONBd03@linutronix.de/
  - Tejun and PeterZ asked for marking CONFIG_RT_GROUP_SCHED broken
    first.
  - Everything after patch #1 that got queued up.

RFC…v1: https://lore.kernel.org/all/20261023161348.t3lpPLQZ@linutronix.de/
  - Try to remove RT-GROUP-sched after figuring out that it is useless.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

---
Sebastian Andrzej Siewior (8):
      sched/deadline: Reject debugfs dl_server writes for not-active CPUs.
      sched: Mark RT_GROUP_SCHED broken
      rcutorture: Don't try to disable to RT throttling.
      sched: rcutorture: Allow to disable DL fair_server
      sched: Move DL's admission control to sysfs
      sched: Limit sysctl sched_rt_{period|runtime}_us to RT_GROUP_SCHED
      sched: Add sysfs files for the per-CPU fair_server knobs
      Documentation/sched: Add fairserver to sched-deadline

 Documentation/arch/arm64/asymmetric-32bit.rst |   2 +-
 Documentation/scheduler/sched-deadline.rst    |  36 ++-
 Documentation/scheduler/sched-rt-group.rst    |   7 +-
 init/Kconfig                                  |   2 +-
 kernel/rcu/rcu.h                              |   2 -
 kernel/rcu/rcutorture.c                       |  37 +--
 kernel/sched/deadline.c                       | 346 +++++++++++++++++++++++++-
 kernel/sched/debug.c                          |  56 +----
 kernel/sched/features.h                       |   2 +
 kernel/sched/rt.c                             |  65 ++---
 kernel/sched/sched.h                          |  63 +++--
 11 files changed, 439 insertions(+), 179 deletions(-)
---
base-commit: fd9230005e85472b81c1c7c16afe93dd878996b1
change-id: 20261110-sched_dl-a9727787112f

Best regards,
--  
Sebastian Andrzej Siewior <bigeasy@linutronix.de>


             reply	other threads:[~2026-11-13 10:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13 10:50 Sebastian Andrzej Siewior [this message]
2026-11-13 10:50 ` [PATCH v3 1/8] sched/deadline: Reject debugfs dl_server writes for not-active CPUs Sebastian Andrzej Siewior
2026-11-13 10:50 ` [PATCH v3 2/8] sched: Mark RT_GROUP_SCHED broken Sebastian Andrzej Siewior
2026-11-13 10:50 ` [PATCH v3 3/8] rcutorture: Don't try to disable to RT throttling Sebastian Andrzej Siewior
2026-11-13 10:50 ` [PATCH v3 4/8] sched: rcutorture: Allow to disable DL fair_server Sebastian Andrzej Siewior
2026-11-13 10:50 ` [PATCH v3 5/8] sched: Move DL's admission control to sysfs Sebastian Andrzej Siewior
2026-11-13 10:50 ` [PATCH v3 6/8] sched: Limit sysctl sched_rt_{period|runtime}_us to RT_GROUP_SCHED Sebastian Andrzej Siewior
2026-11-13 10:50 ` [PATCH v3 7/8] sched: Add sysfs files for the per-CPU fair_server knobs Sebastian Andrzej Siewior
2026-11-13 10:50 ` [PATCH v3 8/8] Documentation/sched: Add fairserver to sched-deadline Sebastian Andrzej Siewior

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=20261113-sched_dl-v3-0-a76ffa1cdeee@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=boqun@kernel.org \
    --cc=bsegall@google.com \
    --cc=cgroups@vger.kernel.org \
    --cc=corbet@lwn.net \
    --cc=dave@stgolabs.net \
    --cc=dietmar.eggemann@arm.com \
    --cc=frederic@kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=jiangshanlai@gmail.com \
    --cc=joelagnelf@nvidia.com \
    --cc=john.ogness@linutronix.de \
    --cc=josh@joshtriplett.org \
    --cc=juri.lelli@redhat.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luca.abeni@santannapisa.it \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=mkoutny@suse.com \
    --cc=neeraj.upadhyay@kernel.org \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.org \
    --cc=qiang.zhang@linux.dev \
    --cc=qyousef@layalina.io \
    --cc=rcu@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=skhan@linuxfoundation.org \
    --cc=tj@kernel.org \
    --cc=urezki@gmail.com \
    --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®