[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKfTPtD1L3ii8VFnZHdaZm=BKz-tSw+cuu7s9U-s9zo14mpPRQ@mail.gmail.com>
Date: Wed, 26 Oct 2022 15:55:34 +0200
From: Vincent Guittot <vincent.guittot@...aro.org>
To: Dietmar Eggemann <dietmar.eggemann@....com>
Cc: Youssef Esmat <youssefesmat@...omium.org>, mingo@...hat.com,
peterz@...radead.org, juri.lelli@...hat.com, rostedt@...dmis.org,
bsegall@...gle.com, mgorman@...e.de, bristot@...hat.com,
vschneid@...hat.com, linux-kernel@...r.kernel.org,
parth@...ux.ibm.com, qais.yousef@....com, chris.hyser@...cle.com,
valentin.schneider@....com, patrick.bellasi@...bug.net,
David.Laight@...lab.com, pjt@...gle.com, pavel@....cz,
tj@...nel.org, qperret@...gle.com, tim.c.chen@...ux.intel.com,
joshdon@...gle.com, timj@....org, joel@...lfernandes.org
Subject: Re: [PATCH v5 7/7] sched/fair: Add latency list
On Wed, 26 Oct 2022 at 12:44, Dietmar Eggemann <dietmar.eggemann@....com> wrote:
>
> On 12/10/2022 17:21, Vincent Guittot wrote:
> > Le mardi 11 oct. 2022 � 18:54:27 (-0500), Youssef Esmat a �crit :
> >> Hi Vincent,
> >>
> >> On Tue, Oct 11, 2022 at 12:10 PM Vincent Guittot
> >> <vincent.guittot@...aro.org> wrote:
>
> [...]
>
> > @@ -10894,12 +10898,17 @@ static int cpu_idle_write_s64(struct cgroup_subsys_state *css,
> > static s64 cpu_latency_nice_read_s64(struct cgroup_subsys_state *css,
> > struct cftype *cft)
> > {
> > + unsigned long period = sysctl_sched_latency;
> > int last_delta = INT_MAX;
> > int prio, delta;
> > s64 weight;
> >
> > + if (sched_feat(GENTLE_FAIR_SLEEPERS))
> > + period >>= 1;
> > +
> > weight = css_tg(css)->latency_offset * NICE_LATENCY_WEIGHT_MAX;
> > - weight = div_s64(weight, sysctl_sched_latency);
> > + period = sysctl_sched_latency;
>
> Looks like this line is wrong here, period has been set already for
> GENTLE_FAIR_SLEEPERS and !GENTLE_FAIR_SLEEPERS?
Yes, I have factorized this in a function and the new version that I'm
preparing so The formula is not duplicated with the risk of error like
above
>
> > + weight = div_s64(weight, period);
> >
> > /* Find the closest nice value to the current weight */
> > for (prio = 0; prio < ARRAY_SIZE(sched_latency_to_weight); prio++) {
>
> [...]
>
Powered by blists - more mailing lists