Re: [PATCH 5/7] sched_ext: idle: Introduce SCX_OPS_BUILTIN_IDLE_PER_NODE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux