From: Quentin Perret <qperret@google.com>
To: Qais Yousef <qais.yousef@arm.com>
Cc: mingo@redhat.com, peterz@infradead.org,
vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
rickyiu@google.com, wvw@google.com, patrick.bellasi@matbug.net,
xuewen.yan94@gmail.com, linux-kernel@vger.kernel.org,
kernel-team@android.com
Subject: Re: [PATCH v2 3/3] sched: Make uclamp changes depend on CAP_SYS_NICE
Date: Fri, 11 Jun 2021 14:43:34 +0000 [thread overview]
Message-ID: <YMN2ljLMUikvCBXk@google.com> (raw)
In-Reply-To: <20210611141737.spzlmuh7ml266c5a@e107158-lin.cambridge.arm.com>
On Friday 11 Jun 2021 at 15:17:37 (+0100), Qais Yousef wrote:
> On 06/11/21 13:49, Quentin Perret wrote:
> > Thinking about it a bit more, a more involved option would be to have
> > this patch as is, but to also introduce a new RLIMIT_UCLAMP on top of
> > it. The semantics could be:
> >
> > - if the clamp requested by the non-privileged task is lower than its
> > existing clamp, then allow;
> > - otherwise, if the requested clamp is less than UCLAMP_RLIMIT, then
> > allow;
> > - otherwise, deny,
> >
> > And the same principle would apply to both uclamp.min and uclamp.max,
> > and UCLAMP_RLIMIT would default to 0.
> >
> > Thoughts?
>
> That could work. But then I'd prefer your patch to go as-is. I don't think
> uclamp can do with this extra complexity in using it.
Sorry I'm not sure what you mean here?
> We basically want to specify we want to be paranoid about uclamp CAP or not. In
> my view that is simple and can't see why it would be a big deal to have
> a procfs entry to define the level of paranoia the system wants to impose. If
> it is a big deal though (would love to hear the arguments);
Not saying it's a big deal, but I think there are a few arguments in
favor of using rlimit instead of a sysfs knob. It allows for a much
finer grain configuration -- constraints can be set per-task as well as
system wide if needed, and it is the standard way of limiting resources
that tasks can ask for.
> requiring apps that
> want to self regulate to have CAP_SYS_NICE is better approach.
Rlimit wouldn't require that though, which is also nice as CAP_SYS_NICE
grants you a lot more power than just clamps ...
next prev parent reply other threads:[~2021-06-11 14:43 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-10 15:13 [PATCH v2 0/3] A few uclamp fixes Quentin Perret
2021-06-10 15:13 ` [PATCH v2 1/3] sched: Fix UCLAMP_FLAG_IDLE setting Quentin Perret
2021-06-10 19:05 ` Peter Zijlstra
2021-06-11 7:25 ` Quentin Perret
2021-06-17 15:27 ` Dietmar Eggemann
2021-06-21 10:57 ` Quentin Perret
2021-06-10 15:13 ` [PATCH v2 2/3] sched: Skip priority checks with SCHED_FLAG_KEEP_PARAMS Quentin Perret
2021-06-10 19:15 ` Peter Zijlstra
2021-06-11 8:59 ` Quentin Perret
2021-06-11 9:07 ` Quentin Perret
2021-06-11 9:20 ` Peter Zijlstra
2021-06-10 15:13 ` [PATCH v2 3/3] sched: Make uclamp changes depend on CAP_SYS_NICE Quentin Perret
2021-06-11 12:48 ` Qais Yousef
2021-06-11 13:08 ` Quentin Perret
2021-06-11 13:26 ` Qais Yousef
2021-06-11 13:49 ` Quentin Perret
2021-06-11 14:17 ` Qais Yousef
2021-06-11 14:43 ` Quentin Perret [this message]
2021-06-14 15:03 ` Qais Yousef
2021-06-21 10:52 ` Quentin Perret
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=YMN2ljLMUikvCBXk@google.com \
--to=qperret@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=patrick.bellasi@matbug.net \
--cc=peterz@infradead.org \
--cc=qais.yousef@arm.com \
--cc=rickyiu@google.com \
--cc=vincent.guittot@linaro.org \
--cc=wvw@google.com \
--cc=xuewen.yan94@gmail.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