[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YzLdxS3dXCHq+bLa@hirez.programming.kicks-ass.net>
Date: Tue, 27 Sep 2022 13:25:57 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>
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 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' ?
> 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?
> +
> + if (busiest_class_delta_score < curr_class_delta_score) {
> + busiest_class_delta_score = curr_class_delta_score;
> + busiest_nr = nr_running;
> + busiest = rq;
> + }
> }
> break;
Powered by blists - more mailing lists