Re: [PATCH 6/6] sched_ext: idle: Introduce node-aware idle cpu kfunc helpers

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

 



Hello,

On Sun, Feb 09, 2025 at 09:11:15AM +0100, Andrea Righi wrote:
...
> About scx_cpu_node(), which is used internally, I think it's convenient to
> return NUMA_NO_NODE when idle-per-node is disabled, just to avoid repeating
> the same check for scx_builtin_idle_per_node everywhere, and NUMA_NO_NODE
> internally always means "use the global cpumask".
> 
> Do you think this is still error-prone? Or should I try to refactor the
> code to get rid of this NUMA_NO_NODE == global cpumask logic?

I think that's fine as long as the name clearly indicates that the function
is doing something special other than mapping CPU to node. It can get pretty
confusing if something with a really generic name doesn't behave in a
generic manner.

Thanks.

-- 
tejun




[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