lkml.org 
[lkml]   [2020]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@gmail.com>

Thanks!

\
 
 \ /
  Last update: 2020-11-17 11:25    [W:0.067 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site