scripts/setup: Fallback to /proc/sys/vm/nr_hugepages if NUMA is not available

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I1801c36ac889e2a25eb937b65382addbbcf7d8b9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10394
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Michal Berger 2021-11-24 17:00:35 +01:00 committed by Tomasz Zawadzki
parent f0f7005bc1
commit 85395e2895

View File

@ -448,6 +448,12 @@ configure_linux_hugepages() {
nodes[${node##*node}]=$node/hugepages/hugepages-${HUGEPGSZ}kB/nr_hugepages
done
if ((${#nodes[@]} == 0)); then
# No NUMA support? Fallback to common interface
check_hugepages_alloc /proc/sys/vm/nr_hugepages
return 0
fi
IFS="," read -ra nodes_to_use <<< "$HUGENODE"
if ((${#nodes_to_use[@]} == 0)); then
nodes_to_use[0]=0