Skip to content

Commit c68ea82

Browse files
arighihtejun
authored andcommitted
sched_ext: idle: Remove unnecessary ifdef in scx_bpf_cpu_node()
There's no need to make scx_bpf_cpu_node() dependent on CONFIG_NUMA, since cpu_to_node() can be used also in systems with CONFIG_NUMA disabled. This also allows to always validate the @cpu argument regardless of the CONFIG_NUMA settings. Fixes: 0105921 ("sched_ext: idle: Introduce node-aware idle cpu kfunc helpers") Signed-off-by: Andrea Righi <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
1 parent 19272b3 commit c68ea82

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

kernel/sched/ext_idle.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -929,14 +929,10 @@ s32 select_cpu_from_kfunc(struct task_struct *p, s32 prev_cpu, u64 wake_flags,
929929
*/
930930
__bpf_kfunc int scx_bpf_cpu_node(s32 cpu)
931931
{
932-
#ifdef CONFIG_NUMA
933932
if (!kf_cpu_valid(cpu, NULL))
934933
return NUMA_NO_NODE;
935934

936935
return cpu_to_node(cpu);
937-
#else
938-
return 0;
939-
#endif
940936
}
941937

942938
/**

0 commit comments

Comments
 (0)