[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201117102346.GF3121406@hirez.programming.kicks-ass.net>
Date: Tue, 17 Nov 2020 11:23:46 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Yun Hsiang <hsiang023167@...il.com>
Cc: Dietmar Eggemann <dietmar.eggemann@....com>,
Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
Vincent Guittot <vincent.guittot@...aro.org>,
Juri Lelli <juri.lelli@...hat.com>,
Patrick Bellasi <patrick.bellasi@...bug.net>,
Qais Yousef <qais.yousef@....com>,
Suren Baghdasaryan <surenb@...gle.com>
Subject: Re: [PATCH v2] sched/uclamp: Allow to reset a task uclamp constraint
value
On Sun, Nov 15, 2020 at 01:05:21PM +0800, Yun Hsiang wrote:
> Hi Dietmar,
> On Fri, Nov 13, 2020 at 12:34:54PM +0100, Dietmar Eggemann wrote:
> > In case the user wants to stop controlling a uclamp constraint value
> > for a task, use the magic value -1 in sched_util_{min,max} with the
> > appropriate sched_flags (SCHED_FLAG_UTIL_CLAMP_{MIN,MAX}) to indicate
> > the reset.
> >
> > The advantage over the 'additional flag' approach (i.e. introducing
> > SCHED_FLAG_UTIL_CLAMP_RESET) is that no additional flag has to be
> > exported via uapi. This avoids the need to document how this new flag
> > has be used in conjunction with the existing uclamp related flags.
> >
> > The following subtle issue is fixed as well. When a uclamp constraint
> > value is set on a !user_defined uclamp_se it is currently first reset
> > and then set.
> > Fix this by AND'ing !user_defined with !SCHED_FLAG_UTIL_CLAMP which
> > stands for the 'sched class change' case.
> > The related condition 'if (uc_se->user_defined)' moved from
> > __setscheduler_uclamp() into uclamp_reset().
>
> I think this is great, thanks!
> Reviewed-by: Yun Hsiang <hsiang023167@...il.com>
Thanks!
Powered by blists - more mailing lists