Skip to content

Commit 9960be7

Browse files
arighihtejun
authored andcommitted
sched_ext: idle: Skip cross-node search with !CONFIG_NUMA
In the idle CPU selection logic, attempting cross-node searches adds unnecessary complexity when CONFIG_NUMA is disabled. Since there's no meaningful concept of nodes in this case, simplify the logic by restricting the idle CPU search to the current node only. Fixes: 4884927 ("sched_ext: idle: Per-node idle cpumasks") Signed-off-by: Andrea Righi <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
1 parent ee9a4e9 commit 9960be7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

kernel/sched/ext_idle.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ static s32 pick_idle_cpu_in_node(const struct cpumask *cpus_allowed, int node, u
138138
goto retry;
139139
}
140140

141+
#ifdef CONFIG_NUMA
141142
/*
142143
* Tracks nodes that have not yet been visited when searching for an idle
143144
* CPU across all available nodes.
@@ -186,6 +187,13 @@ static s32 pick_idle_cpu_from_online_nodes(const struct cpumask *cpus_allowed, i
186187

187188
return cpu;
188189
}
190+
#else
191+
static inline s32
192+
pick_idle_cpu_from_online_nodes(const struct cpumask *cpus_allowed, int node, u64 flags)
193+
{
194+
return -EBUSY;
195+
}
196+
#endif
189197

190198
/*
191199
* Find an idle CPU in the system, starting from @node.

0 commit comments

Comments
 (0)