From: "Michal Koutný" <mkoutny@suse.com>
To: 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>
Cc: linux-kernel@vger.kernel.org, "Michal Koutný" <mkoutny@suse.com>
Subject: [PATCH 1/3] sched/rt: Skip group schedulable check with rt_group_sched=0
Date: Mon, 19 Jan 2026 18:41:19 +0100 [thread overview]
Message-ID: <20260119-sched-rert_groups-v1-1-80c1e5269910@suse.com> (raw)
In-Reply-To: <20260119-sched-rert_groups-v1-0-80c1e5269910@suse.com>
The warning from the commit 87f1fb77d87a6 ("sched: Add RT_GROUP WARN
checks for non-root task_groups") is wrong -- it assumes that only
task_groups with rt_rq are traversed, however, the schedulability check
would iterate all task_groups even when rt_group_sched=0 is disabled at
boot time but some non-root task_groups exist.
The schedulability check is supposed to validate:
a) that children don't overcommit its parent,
b) no RT task group overcommits global RT limit.
but with rt_group_sched=0 there is no (non-trivial) hierarchy of RT groups,
therefore skip the validation altogether.
This fix is immaterial with CONFIG_RT_GROUP_SCHED=n.
Fixes: 87f1fb77d87a6 ("sched: Add RT_GROUP WARN checks for non-root task_groups")
Signed-off-by: Michal Koutný <mkoutny@suse.com>
---
kernel/sched/rt.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index f1867fe8e5c53..2dfdf2d9471be 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -2668,9 +2668,6 @@ static int tg_rt_schedulable(struct task_group *tg, void *data)
tg->rt_bandwidth.rt_runtime && tg_has_rt_tasks(tg))
return -EBUSY;
- if (WARN_ON(!rt_group_sched_enabled() && tg != &root_task_group))
- return -EBUSY;
-
total = to_ratio(period, runtime);
/*
@@ -2814,6 +2811,8 @@ long sched_group_rt_period(struct task_group *tg)
static int sched_rt_global_constraints(void)
{
int ret = 0;
+ if (!rt_group_sched_enabled())
+ return ret;
mutex_lock(&rt_constraints_mutex);
ret = __rt_schedulable(NULL, 0, 0);
--
2.52.0
next prev parent reply other threads:[~2026-01-19 17:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-19 17:41 [PATCH 0/3] sched/rt: Fix schedulable check with rt_group_sched=0 and cleanups Michal Koutný
2026-01-19 17:41 ` Michal Koutný [this message]
2026-01-19 17:41 ` [PATCH 2/3] sched/rt: Move group schedulability check to sched_rt_global_validate() Michal Koutný
2026-02-11 7:57 ` K Prateek Nayak
2026-01-19 17:41 ` [PATCH 3/3] sched/rt: Cleanup global RT bandwidth functions Michal Koutný
2026-02-02 14:13 ` [PATCH 0/3] sched/rt: Fix schedulable check with rt_group_sched=0 and cleanups Michal Koutný
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=20260119-sched-rert_groups-v1-1-80c1e5269910@suse.com \
--to=mkoutny@suse.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.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 \
/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®