From: chenjinghuang <chenjinghuang2@huawei.com>
To: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>
Cc: 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>,
Ridong Chen <ridong.chen@linux.dev>,
Madadi Vineeth Reddy <vineethr@linux.ibm.com>
Subject: Re: [PATCH v2] In cgroup v2, setting a smaller value for sched_rt_runtime_us fails.
Date: Wed, 1 Jul 2026 16:28:51 +0800 [thread overview]
Message-ID: <99b284ff-f968-42e8-b03e-d320cf0f9407@huawei.com> (raw)
In-Reply-To: <20260625110323.2980246-1-chenjinghuang2@huawei.com>
On 6/25/2026 7:03 PM, Chen Jinghuang wrote:
> For example:
> # cat /proc/sys/kernel/sched_rt_runtime_us
> 950000
> # echo 940000 > /proc/sys/kernel/sched_rt_runtime_us
> -bash: echo: write error: Invalid argument
>
Sorry, I forgot that sched_rt_runtime_us is currently set to 1000000,
so it should be the following case:
# cat /proc/sys/kernel/sched_rt_runtime_us
1000000
# echo 940000 > /proc/sys/kernel/sched_rt_runtime_us
-bash: echo: write error: Invalid argument
> With CONFIG_RT_GROUP_SCHED enabled, reducing the global RT quota
> causes the unchanged root cgroup quota to exceed the new global limit.
> The root cgroup quota should be updated accordingly when the global
> quota changes.
>
> Adjust the root cgroup's RT quota whenever the global RT quota is
> modified.
>
> Signed-off-by: Chen Jinghuang <chenjinghuang2@huawei.com>
> Reviewed-by: Ridong Chen <ridong.chen@linux.dev>
> Tested-by: Madadi Vineeth Reddy <vineethr@linux.ibm.com>
> ---
> Change since v1: https://lore.kernel.org/all/20260320013419.2493925-1-chenjinghuang2@huawei.com/
> - Rebase the patch onto mainline.
> ---
> kernel/sched/rt.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
> index e474c31d8fe6..b1b082e365af 100644
> --- a/kernel/sched/rt.c
> +++ b/kernel/sched/rt.c
> @@ -2858,9 +2858,12 @@ static int sched_rt_global_validate(void)
> #ifdef CONFIG_RT_GROUP_SCHED
> if (!rt_group_sched_enabled())
> return 0;
> +
> + u64 period = global_rt_period();
> + u64 runtime = global_rt_runtime();
>
> scoped_guard(mutex, &rt_constraints_mutex)
> - return __rt_schedulable(NULL, 0, 0);
> + return __rt_schedulable(&root_task_group, period, runtime);
> #endif
> return 0;
> }
Gently ping!
prev parent reply other threads:[~2026-07-01 8:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-25 11:03 Chen Jinghuang
2026-07-01 8:28 ` chenjinghuang [this message]
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=99b284ff-f968-42e8-b03e-d320cf0f9407@huawei.com \
--to=chenjinghuang2@huawei.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=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=ridong.chen@linux.dev \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=vineethr@linux.ibm.com \
--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®