TO RESET: mcreboot, mcstop+release.sh: add functions
Change-Id: Ic3992dc4e16b7ade00e93edbd107c64a32068c02
This commit is contained in:
committed by
Masamichi Takagi
parent
10b17e230c
commit
bbfb296c26
@ -65,8 +65,9 @@ umask_old=`umask`
|
||||
idle_halt=""
|
||||
allow_oversubscribe=""
|
||||
time_sharing="time_sharing"
|
||||
force_reserve="no"
|
||||
|
||||
while getopts stk:c:m:o:f:r:q:i:d:e:hOT: OPT
|
||||
while getopts stk:c:m:o:f:r:q:i:d:e:hROT: OPT
|
||||
do
|
||||
case ${OPT} in
|
||||
f) facility=${OPTARG}
|
||||
@ -97,6 +98,8 @@ do
|
||||
;;
|
||||
O) allow_oversubscribe="allow_oversubscribe"
|
||||
;;
|
||||
R) force_reserve="yes"
|
||||
;;
|
||||
T)
|
||||
case ${OPTARG} in
|
||||
1) time_sharing="time_sharing"
|
||||
@ -343,6 +346,17 @@ if ! grep ihk_smp_@ARCH@ /proc/modules &>/dev/null; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ${force_reserve} == "yes" ]; then
|
||||
if ! ${SUDO} ${SBINDIR}/ihkconfig 0 reserve mem ${mem}; then
|
||||
echo "error: reserving memory" >&2
|
||||
error_exit "ihk_smp_loaded"
|
||||
fi
|
||||
if ! ${SUDO} ${SBINDIR}/ihkconfig 0 reserve cpu ${cpus}; then
|
||||
echo "error: reserving CPUs" >&2;
|
||||
error_exit "mem_reserved"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Load mcctrl if not loaded
|
||||
if ! grep mcctrl /proc/modules &>/dev/null; then
|
||||
if ! taskset -c 0 ${SUDO} insmod ${KMODDIR}/mcctrl.ko 2>/dev/null; then
|
||||
|
||||
Reference in New Issue
Block a user