[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221007233658.GA6555@ranerica-svr.sc.intel.com>
Date: Fri, 7 Oct 2022 16:36:58 -0700
From: Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Ricardo Neri <ricardo.neri@...el.com>,
"Ravi V. Shankar" <ravi.v.shankar@...el.com>,
Ben Segall <bsegall@...gle.com>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Len Brown <len.brown@...el.com>, Mel Gorman <mgorman@...e.de>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
Steven Rostedt <rostedt@...dmis.org>,
Tim Chen <tim.c.chen@...ux.intel.com>,
Valentin Schneider <vschneid@...hat.com>, x86@...nel.org,
linux-kernel@...r.kernel.org, "Tim C . Chen" <tim.c.chen@...el.com>
Subject: Re: [RFC PATCH 10/23] sched/fair: Use classes of tasks when
selecting a busiest runqueue
On Tue, Sep 27, 2022 at 01:25:57PM +0200, Peter Zijlstra wrote:
> On Fri, Sep 09, 2022 at 04:11:52PM -0700, Ricardo Neri wrote:
>
> > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> > index 7368a0b453ee..085b1f75d90b 100644
> > --- a/kernel/sched/fair.c
> > +++ b/kernel/sched/fair.c
> > @@ -10009,6 +10009,7 @@ static struct rq *find_busiest_queue(struct lb_env *env,
> > int i;
> >
> > for_each_cpu_and(i, sched_group_span(group), env->cpus) {
> > + int busiest_class_delta_score = INT_MIN;
>
> You sure you want to break ties toward a negative IPC 'improvement' ?
Yes. We may have a negative IPC class delta if the destination CPU has
lower prioriy than the CPUs in the busiest group. This may occur when
the busiest group is a core with more than one busy SMT sibling.
>
> > unsigned long capacity, load, util;
> > unsigned int nr_running;
> > enum fbq_type rt;
> > @@ -10118,6 +10119,20 @@ static struct rq *find_busiest_queue(struct lb_env *env,
> > if (busiest_nr < nr_running) {
> > busiest_nr = nr_running;
> > busiest = rq;
> > + } else if (sched_task_classes_enabled() &&
> > + busiest_nr == nr_running) {
> > + int curr_class_delta_score;
> > +
> > + curr_class_delta_score = arch_get_task_class_score(rq->curr->class,
> > + env->dst_cpu) -
> > + arch_get_task_class_score(rq->curr->class,
> > + cpu_of(rq));
>
> *sigh*, you really couldn't find a more ugly layout if you tried.
>
> Perhaps use less than novella length identifiers?
Sure, I will revisit the naming of the identifiers.
Thanks and BR,
Ricardo
Powered by blists - more mailing lists