All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Yun Hsiang <hsiang023167@gmail.com>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Ingo Molnar <mingo@kernel.org>,
	linux-kernel@vger.kernel.org,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Patrick Bellasi <patrick.bellasi@matbug.net>,
	Qais Yousef <qais.yousef@arm.com>,
	Suren Baghdasaryan <surenb@google.com>
Subject: Re: [PATCH v2] sched/uclamp: Allow to reset a task uclamp constraint value
Date: Tue, 17 Nov 2020 11:23:46 +0100	[thread overview]
Message-ID: <20201117102346.GF3121406@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20201115050521.GA1390370@ubuntu>

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@gmail.com>

Thanks!

  reply	other threads:[~2020-11-17 10:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-13 11:34 [PATCH v2] sched/uclamp: Allow to reset a task uclamp constraint value Dietmar Eggemann
2020-11-15  5:05 ` Yun Hsiang
2020-11-17 10:23   ` Peter Zijlstra [this message]
2020-11-20 12:34 ` [tip: sched/core] " tip-bot2 for Dietmar Eggemann

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=20201117102346.GF3121406@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=dietmar.eggemann@arm.com \
    --cc=hsiang023167@gmail.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=patrick.bellasi@matbug.net \
    --cc=qais.yousef@arm.com \
    --cc=surenb@google.com \
    --cc=vincent.guittot@linaro.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.