[PATCH v2 3/4] usertools/dpdk-hugepages.py: sort by NUMA node
Burakov, Anatoly
anatoly.burakov at intel.com
Fri Aug 16 14:21:12 CEST 2024
On 8/16/2024 2:16 PM, Anatoly Burakov wrote:
> Currently, the list of per-NUMA node hugepages is displayed in glob order,
> which can be arbitrary. Fix it to sort the glob order.
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
> ---
> usertools/dpdk-hugepages.py | 40 ++++++++++++++++++++++++++-----------
> 1 file changed, 28 insertions(+), 12 deletions(-)
>
> diff --git a/usertools/dpdk-hugepages.py b/usertools/dpdk-hugepages.py
> index bf2575ba36..54232ddf22 100755
> --- a/usertools/dpdk-hugepages.py
> +++ b/usertools/dpdk-hugepages.py
> @@ -74,21 +74,37 @@ def set_hugepages(path, reqpages):
> gotpages, reqpages, filename))
>
>
> +def get_numa_pages_node(node):
> + '''Read list of hugepage reservations on specific NUMA node'''
> + hp_path = f'/sys/devices/system/node/node{node}/hugepages'
> + if not os.path.exists(hp_path):
> + return
Oops, should have been return []
--
Thanks,
Anatoly
More information about the dev
mailing list