Re: [PATCH 1/6] sched/topology: introduce for_each_numa_hop_node() / sched_numa_hop_node()

From: Peter Zijlstra
Date: Thu Dec 19 2024 - 14:53:02 EST


On Thu, Dec 19, 2024 at 10:26:59AM -0800, Yury Norov wrote:
> > Given that there usually aren't that many nodes, the current implementation
> > is probably fine too, so please feel free to ignore this suggestion for now
> > too.
>
> I agree. The number of nodes on typical system is 1 or 2. Even if
> it's 8, the Andrea's bubble sort will be still acceptable. So, I'm
> OK with O(N^2) if you guys OK with it. I only would like to have
> this choice explained in commit message.

There are systems with 100s or 1000s of nodes out there. As long as
hitting this code path is optional I suppose that's not a problem, but
if not, they're going to be rather upset.