From 942b7f8b7825747a797c86a37ecc011017f2a4f5 Mon Sep 17 00:00:00 2001 From: Balazs Gerofi Date: Fri, 21 Oct 2016 03:38:21 -0400 Subject: [PATCH] mcreboot-smp-x86: eliminate unnecessary resource queries --- arch/x86/tools/mcreboot-smp-x86.sh.in | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/arch/x86/tools/mcreboot-smp-x86.sh.in b/arch/x86/tools/mcreboot-smp-x86.sh.in index 68790f95..b6253a30 100644 --- a/arch/x86/tools/mcreboot-smp-x86.sh.in +++ b/arch/x86/tools/mcreboot-smp-x86.sh.in @@ -179,19 +179,7 @@ fi # Check for existing OS instance and destroy if [ -c /dev/mcos0 ]; then - # Query CPU cores and memory of OS instance so that the same values are used as previously - if ! ${SBINDIR}/ihkosctl 0 query cpu > /dev/null; then echo "error: querying cpus" >&2; exit 1; fi - cpus=`${SBINDIR}/ihkosctl 0 query cpu` - if ! ${SBINDIR}/ihkosctl 0 query mem > /dev/null; then echo "error: querying memory" >&2; exit 1; fi - mem=`${SBINDIR}/ihkosctl 0 query mem` - - if ! ${SBINDIR}/ihkconfig 0 destroy 0; then echo "warning: destroy failed" >&2; fi -else - # Otherwise query IHK-SMP for resources - if ! ${SBINDIR}/ihkconfig 0 query cpu > /dev/null; then echo "error: querying cpus" >&2; exit 1; fi - cpus=`${SBINDIR}/ihkconfig 0 query cpu` - if ! ${SBINDIR}/ihkconfig 0 query mem > /dev/null; then echo "error: querying memory" >&2; exit 1; fi - mem=`${SBINDIR}/ihkconfig 0 query mem` + if ! ${SBINDIR}/ihkconfig 0 destroy 0; then echo "warning: destroy failed" >&2; fi fi if ! ${SBINDIR}/ihkconfig 0 create; then echo "error: create" >&2; exit; fi