Commit 6d594af5 authored by Andrea Righi's avatar Andrea Righi Committed by Tejun Heo
Browse files

sched_ext: Fix incorrect use of bitwise AND



There is no reason to use a bitwise AND when checking the conditions to
enable NUMA optimization for the built-in CPU idle selection policy, so
use a logical AND instead.

Fixes: f6ce6b94 ("sched_ext: Do not enable LLC/NUMA optimizations when domains overlap")
Reported-by: default avatarNathan Chancellor <nathan@kernel.org>
Closes: https://lore.kernel.org/lkml/20241108181753.GA2681424@thelio-3990X/


Signed-off-by: default avatarAndrea Righi <arighi@nvidia.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent f6ce6b94
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3221,7 +3221,7 @@ static void update_selcpu_topology(void)
	 * for an idle CPU in the same domain twice is redundant.
	 */
	cpus = cpumask_of_node(cpu_to_node(cpu));
	if ((cpumask_weight(cpus) < num_online_cpus()) & llc_numa_mismatch())
	if ((cpumask_weight(cpus) < num_online_cpus()) && llc_numa_mismatch())
		enable_numa = true;
	rcu_read_unlock();