mcreboot-smp: introduction of ikc_map argument

This commit is contained in:
Balazs Gerofi
2017-02-10 06:36:29 +09:00
parent 373e9ea63c
commit 3de0f5ea19

View File

@ -22,6 +22,7 @@ ENABLE_MCOVERLAYFS="@ENABLE_MCOVERLAYFS@"
mem="512M@0"
cpus=""
ikc_map=""
if [ "${BASH_VERSINFO[0]}" -lt 4 ]; then
echo "You need at least bash-4.0 to run this script." >&2
@ -41,7 +42,7 @@ fi
turbo=""
while getopts :ti:k:c:m:o:f: OPT
while getopts :ti:k:c:m:o:f:r: OPT
do
case ${OPT} in
f) facility=${OPTARG}
@ -78,6 +79,8 @@ do
;;
m) mem=${OPTARG}
;;
r) ikc_map=${OPTARG}
;;
t) turbo="turbo"
;;
*) echo "invalid option -${OPT}" >&2
@ -370,6 +373,14 @@ if ! ${SBINDIR}/ihkosctl 0 assign cpu ${cpus}; then
error_exit "os_created"
fi
if [ "$ikc_map" != "" ]; then
# Specify IKC map
if ! ${SBINDIR}/ihkosctl 0 ikc_map ${ikc_map}; then
echo "error: assign CPUs" >&2
error_exit "os_created"
fi
fi
# Assign memory
if ! ${SBINDIR}/ihkosctl 0 assign mem ${mem}; then
echo "error: assign memory" >&2