[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z64cO6Y-aWUT07vN@gpd3>
Date: Thu, 13 Feb 2025 17:22:19 +0100
From: Andrea Righi <arighi@...dia.com>
To: Yury Norov <yury.norov@...il.com>
Cc: Tejun Heo <tj@...nel.org>, David Vernet <void@...ifault.com>,
Changwoo Min <changwoo@...lia.com>, Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
Valentin Schneider <vschneid@...hat.com>,
Joel Fernandes <joel@...lfernandes.org>, Ian May <ianm@...dia.com>,
bpf@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/7] sched_ext: idle: Introduce
SCX_OPS_BUILTIN_IDLE_PER_NODE
On Thu, Feb 13, 2025 at 11:08:01AM -0500, Yury Norov wrote:
...
> > @@ -237,13 +240,19 @@ void scx_idle_update_selcpu_topology(void)
> > * If all CPUs belong to the same NUMA node and the same LLC domain,
> > * enabling both NUMA and LLC optimizations is unnecessary, as checking
> > * for an idle CPU in the same domain twice is redundant.
> > + *
> > + * If SCX_OPS_BUILTIN_IDLE_PER_NODE is enabled ignore the NUMA
> > + * optimization, as we would naturally select idle CPUs within
> > + * specific NUMA nodes querying the corresponding per-node cpumask.
> > */
> > - nr_cpus = numa_weight(cpu);
> > - if (nr_cpus > 0) {
> > - if (nr_cpus < num_online_cpus() && llc_numa_mismatch())
> > - enable_numa = true;
> > - pr_debug("sched_ext: NUMA=%*pb weight=%u\n",
> > - cpumask_pr_args(numa_span(cpu)), numa_weight(cpu));
> > + if (!(ops->flags & SCX_OPS_BUILTIN_IDLE_PER_NODE)) {
> > + nr_cpus = numa_weight(cpu);
> > + if (nr_cpus > 0) {
> > + if (nr_cpus < num_online_cpus() && llc_numa_mismatch())
> > + enable_numa = true;
> > + pr_debug("sched_ext: NUMA=%*pb weight=%u\n",
> > + cpumask_pr_args(numa_span(cpu)), numa_weight(cpu));
>
> No need to call numa_weight(cpu) for the 2nd time, right?
Ah good catch, will fix that.
Thanks,
-Andrea
Powered by blists - more mailing lists