samples: offline SOS cpus before launch uos
offline SOS cpus except BSP to let them free for UOS cpu allocation Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
d5ead6151c
commit
e71a0887a0
|
@ -335,6 +335,17 @@ mount /dev/mmcblk1p3 /data
|
||||||
# make sure there is enough 2M hugepages in the pool
|
# make sure there is enough 2M hugepages in the pool
|
||||||
echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
|
echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
|
||||||
|
|
||||||
|
# offline SOS CPUs except BSP before launch UOS
|
||||||
|
for i in `ls -d /sys/devices/system/cpu/cpu[1-99]`; do
|
||||||
|
online=`cat $i/online`
|
||||||
|
idx=`echo $i | tr -cd "[1-99]"`
|
||||||
|
echo cpu$idx online=$online
|
||||||
|
if [ "$online" = "1" ]; then
|
||||||
|
echo 0 > $i/online
|
||||||
|
echo $idx > /sys/class/vhm/acrn_vhm/offline_cpu
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
case $launch_type in
|
case $launch_type in
|
||||||
1) echo "Launch clearlinux UOS"
|
1) echo "Launch clearlinux UOS"
|
||||||
launch_clearlinux 1 3 "64 448 8" 0x070F00 clearlinux $debug
|
launch_clearlinux 1 3 "64 448 8" 0x070F00 clearlinux $debug
|
||||||
|
|
|
@ -33,4 +33,15 @@ acrn-dm -A -m $mem_size -c $2 -s 0:0,hostbridge -s 1:0,lpc -l com1,stdio \
|
||||||
i915.enable_guc_submission=0" $vm_name
|
i915.enable_guc_submission=0" $vm_name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# offline SOS CPUs except BSP before launch UOS
|
||||||
|
for i in `ls -d /sys/devices/system/cpu/cpu[1-99]`; do
|
||||||
|
online=`cat $i/online`
|
||||||
|
idx=`echo $i | tr -cd "[1-99]"`
|
||||||
|
echo cpu$idx online=$online
|
||||||
|
if [ "$online" = "1" ]; then
|
||||||
|
echo 0 > $i/online
|
||||||
|
echo $idx > /sys/class/vhm/acrn_vhm/offline_cpu
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
launch_clear 2 1 "64 448 8" 0x070F00 clear
|
launch_clear 2 1 "64 448 8" 0x070F00 clear
|
||||||
|
|
Loading…
Reference in New Issue