linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Xuewen Yan <xuewen.yan94@gmail.com>
To: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Qais Yousef <qais.yousef@arm.com>,
	Quentin Perret <qperret@google.com>,
	Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Benjamin Segall <bsegall@google.com>,
	Mel Gorman <mgorman@suse.de>,
	Daniel Bristot de Oliveira <bristot@redhat.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Chunyan Zhang <zhang.lyra@gmail.com>,
	Ryan Y <xuewyan@foxmail.com>,
	Patrick Bellasi <patrick.bellasi@matbug.net>,
	tj@kernel.org
Subject: Re: [PATCH] sched/uclamp: Avoid setting cpu.uclamp.min bigger than cpu.uclamp.max
Date: Sat, 5 Jun 2021 10:14:04 +0800	[thread overview]
Message-ID: <CAB8ipk_7_ta3Wtfn4=g=08u7nXoR403y0AKQZUR3i=j=yeUeng@mail.gmail.com> (raw)
In-Reply-To: <d57e4a37-3e17-3f30-d055-729ece19f555@arm.com>

On Sat, Jun 5, 2021 at 12:22 AM Dietmar Eggemann
<dietmar.eggemann@arm.com> wrote:
>
> On 04/06/2021 18:08, Qais Yousef wrote:
> > On 06/03/21 10:24, Xuewen Yan wrote:
> >> +CC Qais
> >
> > Thanks for the CC :)
> >
> >>
> >>
> >> Hi Quentin
> >>
> >> On Wed, Jun 2, 2021 at 9:22 PM Quentin Perret <qperret@google.com> wrote:
> >>>
> >>> +CC Patrick and Tejun
> >>>
> >>> On Wednesday 02 Jun 2021 at 20:38:03 (+0800), Xuewen Yan wrote:
> >>>> From: Xuewen Yan <xuewen.yan@unisoc.com>
> >>>>
> >>>> When setting cpu.uclamp.min/max in cgroup, there is no validating
> >>>> like uclamp_validate() in __sched_setscheduler(). It may cause the
> >>>> cpu.uclamp.min is bigger than cpu.uclamp.max.
> >>>
> >>> ISTR this was intentional. We also allow child groups to ask for
> >>> whatever clamps they want, but that is always limited by the parent, and
> >>> reflected in the 'effective' values, as per the cgroup delegation model.
> >
> > As Quentin said. This intentional to comply with cgroup model.
> >
> > See Limits and Protections sections in Documentation/admin-guide/cgroup-v2.rst
> >
> > Specifically
> >
> >       "all configuration combinations are valid"
> >
> > So user can set cpu.uclamp.min higher than cpu.uclamp.max. But when we apply
> > the setting, cpu.uclamp.min will be capped by cpu.uclamp.max. I can see you
> > found the cpu_util_update_eff() logic.
>
> To support this:
>
> Patrick had appropriate checks in his `[PATCH v10 12/16] sched/core:
> uclamp: Extend CPU's cgroup controller`.
>
> https://lkml.kernel.org/r/20190621084217.8167-13-patrick.bellasi@arm.com
>
> But is was discussed that cgroup v2 `resource distribution model`
> configurations (here protection/limit: uclamp_min/uclamp_max) should not
> be restricted.
>
> Further down in this thread:
>
> "... Limits always trump protection in effect of course but please don't
> limit what can be configured..."

Okay, I have got it. Thanks a lot!

BR
xuewen.yan

  reply	other threads:[~2021-06-05  2:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-02 12:38 Xuewen Yan
2021-06-02 13:22 ` Quentin Perret
2021-06-03  2:24   ` Xuewen Yan
2021-06-04 16:08     ` Qais Yousef
2021-06-04 16:22       ` Dietmar Eggemann
2021-06-05  2:14         ` Xuewen Yan [this message]
2021-06-05  2:12       ` Xuewen Yan
2021-06-05 11:49         ` Qais Yousef
2021-06-05 13:24           ` Xuewen Yan
2021-06-05 14:14             ` Qais Yousef
2021-06-07 13:49             ` Qais Yousef
2021-06-08 11:45               ` Xuewen Yan
2021-06-08 14:25                 ` Qais Yousef
2021-06-08 15:01                   ` Xuewen Yan
2021-06-08 18:21                     ` Qais Yousef

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='CAB8ipk_7_ta3Wtfn4=g=08u7nXoR403y0AKQZUR3i=j=yeUeng@mail.gmail.com' \
    --to=xuewen.yan94@gmail.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=patrick.bellasi@matbug.net \
    --cc=peterz@infradead.org \
    --cc=qais.yousef@arm.com \
    --cc=qperret@google.com \
    --cc=rostedt@goodmis.org \
    --cc=tj@kernel.org \
    --cc=vincent.guittot@linaro.org \
    --cc=xuewyan@foxmail.com \
    --cc=zhang.lyra@gmail.com \
    --subject='Re: [PATCH] sched/uclamp: Avoid setting cpu.uclamp.min bigger than cpu.uclamp.max' \
    /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

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox