lkml.org 
[lkml]   [2018]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 03/15] sched/core: uclamp: map TASK's clamp values into CPU's clamp groups
On 07-Nov 13:19, Peter Zijlstra wrote:
> On Mon, Oct 29, 2018 at 06:32:57PM +0000, Patrick Bellasi wrote:
> > +struct uclamp_se {
> > + unsigned int value : SCHED_CAPACITY_SHIFT + 1;
> > + unsigned int group_id : order_base_2(UCLAMP_GROUPS);
>
> Are you sure about ob2() ? seems weird we'll end up with 0 for
> UCLAMP_GROUPS==1.

So, we have:

#define UCLAMP_GROUPS (CONFIG_UCLAMP_GROUPS_COUNT + 1)

because one clamp group is always reserved for defaults.
Thus, ob2(in) is always called with n>=2.

... should be safe no ?

However, will check better again on v6 for possible corner-cases...

> > + unsigned int mapped : 1;
> > +};

--
#include <best/regards.h>

Patrick Bellasi

\
 
 \ /
  Last update: 2018-11-07 15:20    [W:0.109 / U:0.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site