[PATCH v2] buildtools: ensure the NUMA nodes are counted correct

Thomas Monjalon thomas at monjalon.net
Tue Oct 11 01:11:51 CEST 2022


22/09/2022 10:06, Niklas Söderlund:
> From: Peng Zhang <peng.zhang at corigine.com>
> 
> The method to fetch, sort and read the last entry of a list to figure
> out the total number of NUMA nodes in the system fails with 10 or more
> nodes. The reason being the usage of string compare while sorting, hence
> node 'node10' will be sorted before 'node2'.
> 
> Solve this by sorting the list based on integer comparison of the
> numerical part of the node name.
> 
> Before this change on a system with 16 NUMA nodes,
> 
>     EAL: Detected CPU lcores: 128
>     EAL: Detected NUMA nodes: 10
>     EAL: Static memory layout is selected, amount of reserved memory can
> 	 be adjusted with -m or --socket-mem
>     EAL: Detected static linkage of DPDK
>     EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
>     EAL: Selected IOVA mode 'VA'
>     EAL: VFIO support initialized
> 
> With this change on the same system,
> 
>     EAL: Detected CPU lcores: 128
>     EAL: Detected NUMA nodes: 16
>     EAL: Static memory layout is selected, amount of reserved memory can
> 	 be adjusted with -m or --socket-mem
>     EAL: Detected static linkage of DPDK
>     EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
>     EAL: Selected IOVA mode 'VA'
>     EAL: VFIO support initialized
> 
> Fixes: 8ef09fdc506b ("build: add optional NUMA and CPU counts detection")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Peng Zhang <peng.zhang at corigine.com>
> Signed-off-by: Chaoyong He <chaoyong.he at corigine.com>
> Reviewed-by: Niklas Söderlund <niklas.soderlund at corigine.com>

Applied, thanks.






More information about the stable mailing list