Skip to content

Commit 6266dd0

Browse files
mgcaowenlingz
authored andcommitted
DM: correct memory allocation size for UOS
on 8GB MRB: cat /proc/meminfo|head -n 1|awk '{print $2}' it is: 7993388, it is not 8000000, so set it compare with 7500000, then it can allocate 6GB to UOS. Tracked-On: #1657 Signed-off-by: Minggui Cao <minggui.cao@intel.com> Reviewed-by: Binbin Wu <binbin.wu@intel.com>
1 parent ac5b46e commit 6266dd0

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

devicemodel/samples/apl-mrb/launch_uos.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ echo "8086 5aca" > /sys/bus/pci/drivers/pci-stub/new_id
101101
echo "0000:00:1b.0" > /sys/bus/pci/devices/0000:00:1b.0/driver/unbind
102102
echo "0000:00:1b.0" > /sys/bus/pci/drivers/pci-stub/bind
103103

104-
#for memsize setting
104+
#for memsize setting, total 8GB(>7.5GB) uos->6GB, 4GB(>3.5GB) uos->2GB
105105
memsize=`cat /proc/meminfo|head -n 1|awk '{print $2}'`
106-
if [ $memsize -gt 8000000 ];then
106+
if [ $memsize -gt 7500000 ];then
107107
mem_size=6G
108-
elif [ $memsize -gt 4000000 ];then
109-
mem_size=2048M
108+
elif [ $memsize -gt 3500000 ];then
109+
mem_size=2G
110110
else
111111
mem_size=1750M
112112
fi
@@ -271,12 +271,12 @@ else
271271
boot_cse_option="$boot_cse_option"" -s 15,virtio-heci,d1 "
272272
fi
273273

274-
#for memsize setting
274+
#for memsize setting, total 8GB(>7.5GB) uos->6GB, 4GB(>3.5GB) uos->2GB
275275
memsize=`cat /proc/meminfo|head -n 1|awk '{print $2}'`
276-
if [ $memsize -gt 8000000 ];then
276+
if [ $memsize -gt 7500000 ];then
277277
mem_size=6G
278-
elif [ $memsize -gt 4000000 ];then
279-
mem_size=2048M
278+
elif [ $memsize -gt 3500000 ];then
279+
mem_size=2G
280280
else
281281
mem_size=1750M
282282
fi

0 commit comments

Comments
 (0)