[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191115202105.GR4131@hirez.programming.kicks-ass.net>
Date: Fri, 15 Nov 2019 21:21:05 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Vincent Guittot <vincent.guittot@...aro.org>
Cc: Valentin Schneider <valentin.schneider@....com>,
linux-kernel <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Dietmar Eggemann <Dietmar.Eggemann@....com>,
Tejun Heo <tj@...nel.org>,
Patrick Bellasi <patrick.bellasi@...bug.net>,
Suren Baghdasaryan <surenb@...gle.com>,
Quentin Perret <qperret@...gle.com>,
Qais Yousef <qais.yousef@....com>
Subject: Re: [PATCH v2] sched/uclamp: Fix overzealous type replacement
On Fri, Nov 15, 2019 at 06:34:19PM +0100, Vincent Guittot wrote:
> On Fri, 15 Nov 2019 at 18:10, Valentin Schneider
> <valentin.schneider@....com> wrote:
> >
> > On 15/11/2019 14:29, Valentin Schneider wrote:
> > > On 15/11/2019 14:07, Vincent Guittot wrote:
> > >>> -static inline enum uclamp_id uclamp_none(enum uclamp_id clamp_id)
> > >>> +static inline unsigned int uclamp_none(enum uclamp_id clamp_id)
> > >>
> > >> Out of curiosity why uclamp decided to use unsigned int to manipulate
> > >> utilization instead of unsigned long which is the type of util_avg ?
> > >>
> > >
> > > I didn't stare at the discussion much, but I think it stems from the
> > > design choices behind struct uclamp_se: everything is crammed in an unsigned
> > > int bitfield. Let me see if I can find some relevant mails.
> > >
> >
> > So I think a relevant mail is:
> >
> > https://lore.kernel.org/lkml/20180912174236.GB24106@hirez.programming.kicks-ass.net/
> >
> > Other than that, the uclamp_se.value field was 'int' in v1 and has been
> > 'unsigned int' for all following versions. uclamp_bucket.value is a bitfield
> > of an 'unsigned long' just because we want more headroom for the tasks count,
> > AFAICT.
>
> Thanks for the pointer and deep diving in the email threads
It was all in an effort to minimize the number of cachelines touched to
maintain this data.
Powered by blists - more mailing lists