Skip to content

Commit 6d594af

Browse files
arighihtejun
authored andcommitted
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: f6ce6b9 ("sched_ext: Do not enable LLC/NUMA optimizations when domains overlap") Reported-by: Nathan Chancellor <[email protected]> Closes: https://lore.kernel.org/lkml/20241108181753.GA2681424@thelio-3990X/ Signed-off-by: Andrea Righi <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
1 parent f6ce6b9 commit 6d594af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/sched/ext.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3221,7 +3221,7 @@ static void update_selcpu_topology(void)
32213221
* for an idle CPU in the same domain twice is redundant.
32223222
*/
32233223
cpus = cpumask_of_node(cpu_to_node(cpu));
3224-
if ((cpumask_weight(cpus) < num_online_cpus()) & llc_numa_mismatch())
3224+
if ((cpumask_weight(cpus) < num_online_cpus()) && llc_numa_mismatch())
32253225
enable_numa = true;
32263226
rcu_read_unlock();
32273227

0 commit comments

Comments
 (0)