On 2019-11-21Âat 23:17ÂPengfei LiÂwrote:
Motivation
----------
Currently if we want to iterate through all the nodes we have to
traverse all the zones from the zonelist.
So in order to reduce the number of loops required to traverse node,
this series of patches modified the zonelist to nodelist.
Two new macros have been introduced:
1) for_each_node_nlist
2) for_each_node_nlist_nodemask
Benefit
-------
1. For a NUMA system with N nodes, each node has M zones, the number
ÂÂ of loops is reduced from N*M times to N times when traversing node.
It looks to me that we don't really have system which has N nodes and
each node withÂM zones in its address range.
We may have systems which has several nodes, but only the first node has
all zone types, other nodes only have NORMAL zone. (Evenly distribute the
!NORMAL zones on all nodes is not reasonable, as those zones have limited
size)
So iterate over zones to reach nodes should at N level, not M*N level.