From: Valentin Schneider <vschneid@redhat.com>
To: Yajun Deng <yajun.deng@linux.dev>,
mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
bristot@redhat.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] sched/rt: fix the case where sched_rt_period_us is negative
Date: Tue, 17 May 2022 15:48:46 +0100 [thread overview]
Message-ID: <xhsmhk0ak1agh.mognet@vschneid.remote.csb> (raw)
In-Reply-To: <fdfc0c8f6027c2071674d52f27f7d7da@linux.dev>
On 17/05/22 01:55, Yajun Deng wrote:
> May 16, 2022 11:04 PM, "Valentin Schneider" <vschneid@redhat.com> wrote:
>>> },
>>> {
>>> .procname = "sched_rt_runtime_us",
>>> @@ -44,6 +45,8 @@ static struct ctl_table sched_rt_sysctls[] = {
>>> .maxlen = sizeof(int),
>>> .mode = 0644,
>>> .proc_handler = sched_rt_handler,
>>> + .extra1 = SYSCTL_NEG_ONE,
>>> + .extra2 = (void *)&sysctl_sched_rt_period,
>>
>> Per this, you could also remove the
>>
>> ((sysctl_sched_rt_runtime > sysctl_sched_rt_period) ||
>>
>> from sched_rt_global_validate(), no?
>>
>
> No, the extra2 just limit the maximum value of sysctl_sched_rt_runtime is sysctl_sched_rt_period, but not limit the minimum value of sysctl_sched_rt_period is sysctl_sched_rt_runtime. (sysctl_sched_rt_runtime > sysctl_sched_rt_period) can do both.
Gotcha.
> Its purpose is to return error earlier. Perhaps I should remove extra2 to avoid ambiguity.
>
It's probably better to only have the "pure" bounds in there yes.
prev parent reply other threads:[~2022-05-17 14:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-12 0:39 Yajun Deng
2022-05-16 15:04 ` Valentin Schneider
2022-05-17 1:55 ` Yajun Deng
2022-05-17 14:48 ` Valentin Schneider [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=xhsmhk0ak1agh.mognet@vschneid.remote.csb \
--to=vschneid@redhat.com \
--cc=bristot@redhat.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=yajun.deng@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 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®