summaryrefslogtreecommitdiffstats
path: root/build/build_perf_image.sh
diff options
context:
space:
mode:
authorMichael Chapman <michapma@redhat.com>2016-09-08 07:07:56 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-09-08 07:07:56 +0000
commit0f2b8756371b44d6ce40d6d52604bc5d82b72f1d (patch)
tree768c82384c774a0521a8a46db313a9ff363c05e9 /build/build_perf_image.sh
parent986257a19dfecccff51173a903e9a0913abcc5cd (diff)
parent664851a1f82151984c299bcdfba9a94ff2e5b777 (diff)
Merge "Fixes FDIO kernel settings"
Diffstat (limited to 'build/build_perf_image.sh')
-rw-r--r--build/build_perf_image.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/build/build_perf_image.sh b/build/build_perf_image.sh
index a6ca066b..68a1804f 100644
--- a/build/build_perf_image.sh
+++ b/build/build_perf_image.sh
@@ -32,5 +32,12 @@ fi
if [ "$CATEGORY" == "kernel" ]; then
echo "${KEY}=${VALUE}" >> $ROLE-kernel_params.txt
+ if [[ "$dataplane" == 'fdio' && "$KEY" == 'hugepages' ]]; then
+ # set kernel hugepages params for fdio
+ LIBGUESTFS_BACKEND=direct virt-customize --run-command "echo vm.hugetlb_shm_group=0 >> /usr/lib/sysctl.d/00-system.conf" \
+ --run-command "echo vm.max_map_count=$(printf "%.0f" $(echo 2.2*$VALUE | bc)) >> /usr/lib/sysctl.d/00-system.conf" \
+ --run-command "echo kernel.shmmax==$((VALUE * 2 * 1024 * 1024)) >> /usr/lib/sysctl.d/00-system.conf" \
+ -a ${IMAGE}
+ fi
fi