aboutsummaryrefslogtreecommitdiffstats
path: root/tests/dmm/dmm_scripts/setup_hugepage.sh
diff options
context:
space:
mode:
authorsharath <sharathkumarboyanapally@gmail.com>2018-10-09 15:16:18 +0530
committerVratko Polak <vrpolak@cisco.com>2018-10-24 18:21:26 +0000
commitda8fb7d7ab386fdefb728d71bfce9bb73624977c (patch)
tree52458408726e8f032ee373e727df7de2a9efebf5 /tests/dmm/dmm_scripts/setup_hugepage.sh
parentf3e74e6b21a5d5568f4bd1357222e8a014d8397c (diff)
Migration of DMM-CSIT scripts to DMM repo
Change-Id: Ibaa7652b24385805b5cdd1540ed98b09e68c69bc Signed-off-by: sharath <sharathkumarboyanapally@gmail.com>
Diffstat (limited to 'tests/dmm/dmm_scripts/setup_hugepage.sh')
-rwxr-xr-xtests/dmm/dmm_scripts/setup_hugepage.sh37
1 files changed, 0 insertions, 37 deletions
diff --git a/tests/dmm/dmm_scripts/setup_hugepage.sh b/tests/dmm/dmm_scripts/setup_hugepage.sh
deleted file mode 100755
index be25709e01..0000000000
--- a/tests/dmm/dmm_scripts/setup_hugepage.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/bash -x
-
-# check and setup the hugepages
-SYS_HUGEPAGE=$(cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages)
-hugepageFree=$(cat /sys/kernel/mm/hugepages/hugepages-2048kB/free_hugepages)
-
-if [ ${SYS_HUGEPAGE} -lt 1536 ] || [ $hugepageFree -eq 0 ]; then
- MOUNT=$(mount | grep /mnt/nstackhuge)
- count=$(mount | grep /mnt/nstackhuge | wc -l)
-
- while [ "${MOUNT}" != "" ] || [ "${count}" -ne 0 ]
- do
- sudo umount /mnt/nstackhuge
- sleep 1
- MOUNT=$(mount | grep /mnt/nstackhuge)
- count=$[$count -1]
- done
-
- sock_count=$(lscpu | grep 'Socket(s):' | head -1 | awk '{print $2}')
- ls -l /sys/devices/system/node/
-
- while [ "${sock_count}" -ne 0 ]
- do
- sock_count=$[$sock_count - 1]
- echo 1536 | sudo tee /sys/devices/system/node/node"$sock_count"/hugepages/hugepages-2048kB/nr_hugepages
- done
-
- sudo mkdir -p /mnt/nstackhuge
- sudo mount -t hugetlbfs -o pagesize=2M none /mnt/nstackhuge/
- test $? -eq 0 || exit 1
-else
- sudo mkdir -p /mnt/nstackhuge
- sudo mount -t hugetlbfs -o pagesize=2M none /mnt/nstackhuge/
-fi
-
-cat /proc/meminfo
-exit 0