runtime: add 16M hugepages to config and init 08/2808/2
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>
Mon, 12 Sep 2016 10:27:45 +0000 (12:27 +0200)
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>
Mon, 12 Sep 2016 10:27:45 +0000 (12:27 +0200)
ppc64el has 16M huge pages so they are added to the config and init
scripts.
Along that it became obvious that the comment in the conf should be
tweaked at least a bit to be more readable.

Change-Id: Ic97f20f17203b0a423439f7a6323879e25c47886
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
debian/dpdk-init
debian/dpdk.conf

index 2872e49..103488e 100755 (executable)
@@ -124,6 +124,9 @@ mount_hugetlbfs() {
     if [ -n "${NR_2M_PAGES}" -a -z "$(get_hugetlbfs_mountpoint '2M')" ]; then
         _mount_hugetlbfs 2M
     fi
+    if [ -n "${NR_16M_PAGES}" -a -z "$(get_hugetlbfs_mountpoint '16M')" ]; then
+        _mount_hugetlbfs 16M
+    fi
     if [ -n "${NR_1G_PAGES}" -a -z "$(get_hugetlbfs_mountpoint '1G')" ]; then
         _mount_hugetlbfs 1G
     fi
@@ -166,6 +169,7 @@ setup_hugepages() {
     . /etc/dpdk/dpdk.conf
 
     _setup_hugepages "hugepages-2048kB" "$NR_2M_PAGES"
+    _setup_hugepages "hugepages-16384kB" "$NR_16M_PAGES"
     _setup_hugepages "hugepages-1048576kB" "$NR_1G_PAGES"
 
     # dpdk uses 2*#hugepages mappings, increase for huge systems LP #1507921
index fb4572d..a5aea86 100644 (file)
@@ -2,16 +2,22 @@
 # The number of 2M hugepages to reserve on system boot
 #
 # Default is 0
-# To e.g. let it reserve 64x 2M Hugepages set:
+# To e.g. let it reserve 128M via 64x 2M Hugepages set:
 # NR_2M_PAGES=64
 
 #
 # The number of 1G hugepages to reserve on system boot
 #
 # Default is 0
-# To e.g. let it reserve 2x 1G Hugepages set:
+# To e.g. let it reserve 2G via 2x 1G Hugepages set:
 # NR_1G_PAGES=2
 
+# The number of 16M hugepages to reserve, supported e.g. on ppc64el
+#
+# Default is 0
+# To e.g. let it reserve 512M via 32x 16M Hugepages set:
+# NR_16M_PAGES=32
+
 #
 # Dropping slab and pagecache can help to successfully allocate hugepages,
 # especially later in the lifecycle of a system.