From: "Richard Weinberger (sigma star gmbh)" <rw@kernel.org>
To: xenomai@lists.linux.dev
Cc: upstream+xenomai@sigma-star.at, Richard Weinberger <richard@nod.at>
Subject: [RFC PATCH 0/5] RT throttling
Date: Tue, 1 Dec 2026 15:12:02 +0100 [thread overview]
Message-ID: <20261201141207.2876277-1-rw@kernel.org> (raw)
From: Richard Weinberger <richard@nod.at>
This patch series implements an RT throttle like Linux has.
It allows limiting the total CPU time used by Cobalt threads,
if the limit is reached, Linux gets the CPU.
That way, misbehaving applications won't kill the system and
will only get throttled instead of killed by the Xenomai runaway
thread detection.
The main reason I need this feature is because for a rather specific
use case, I need to limit the total available CPU time for all
userspace, so Xenomai plus Linux.
I'm curious to read how much you'll hate this. ;-)
Thanks,
//richard
Richard Weinberger (5):
cobalt/trace: add cobalt_sched_throttle tracepoint
cobalt/sched: add RT throttling
cobalt/sched-sporadic: stop budget accounting on RT throttling
cobalt/sched-quota: charge the running group on RT throttling
testsuite/smokey: add sched-throttle test
configure.ac | 1 +
doc/asciidoc/README.INSTALL.adoc | 12 +
include/cobalt/kernel/sched-throttle.h | 92 ++++++
include/cobalt/kernel/sched.h | 25 +-
kernel/cobalt/Kconfig | 26 ++
kernel/cobalt/Makefile | 1 +
kernel/cobalt/sched-quota.c | 39 ++-
kernel/cobalt/sched-sporadic.c | 7 +
kernel/cobalt/sched-throttle.c | 266 ++++++++++++++++++
kernel/cobalt/sched.c | 31 +-
kernel/cobalt/trace/cobalt-core.h | 17 ++
testsuite/smokey/Makefile.am | 2 +
testsuite/smokey/sched-throttle/Makefile.am | 8 +
.../smokey/sched-throttle/sched-throttle.c | 251 +++++++++++++++++
14 files changed, 763 insertions(+), 15 deletions(-)
create mode 100644 include/cobalt/kernel/sched-throttle.h
create mode 100644 kernel/cobalt/sched-throttle.c
create mode 100644 testsuite/smokey/sched-throttle/Makefile.am
create mode 100644 testsuite/smokey/sched-throttle/sched-throttle.c
--
2.56.1
next reply other threads:[~2026-12-01 14:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 14:12 Richard Weinberger (sigma star gmbh) [this message]
2026-12-01 14:12 ` [PATCH 1/5] cobalt/trace: add cobalt_sched_throttle tracepoint Richard Weinberger (sigma star gmbh)
2026-12-01 14:12 ` [PATCH 2/5] cobalt/sched: add RT throttling Richard Weinberger (sigma star gmbh)
2026-12-01 14:12 ` [PATCH 3/5] cobalt/sched-sporadic: stop budget accounting on " Richard Weinberger (sigma star gmbh)
2026-12-01 14:12 ` [PATCH 4/5] cobalt/sched-quota: charge the running group " Richard Weinberger (sigma star gmbh)
2026-12-01 14:12 ` [PATCH 5/5] testsuite/smokey: add sched-throttle test Richard Weinberger (sigma star gmbh)
2026-12-01 15:29 ` [RFC PATCH 0/5] RT throttling Jan Kiszka
2026-12-01 15:32 ` Richard Weinberger
2026-12-01 15:36 ` Jan Kiszka
2026-12-01 15:38 ` Richard Weinberger
2026-12-01 15:40 ` Jan Kiszka
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=20261201141207.2876277-1-rw@kernel.org \
--to=rw@kernel.org \
--cc=richard@nod.at \
--cc=upstream+xenomai@sigma-star.at \
--cc=xenomai@lists.linux.dev \
/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.