Re: [PATCH 2/2] selftests/mm: fix ksm NUMA merge test for systems with memoryless NUMA nodes

From: David Hildenbrand (Arm)

Date: Fri Jun 26 2026 - 11:56:43 EST


>
> +static int count_mem_nodes(void)
> +{
> + int node, count = 0;
> +
> + for (node = 0; node <= numa_max_node(); node++) {
> + if (numa_node_size(node, NULL) > 0)
> + count++;
> + }
> +
> + return count;
> +}
> +

Can we instead build upon our existing helpers get_first_mem_node() +
get_next_mem_node() ?