aboutsummaryrefslogtreecommitdiff
path: root/rootdir/etc/init.qcom.sh
diff options
context:
space:
mode:
Diffstat (limited to 'rootdir/etc/init.qcom.sh')
-rwxr-xr-xrootdir/etc/init.qcom.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/rootdir/etc/init.qcom.sh b/rootdir/etc/init.qcom.sh
index 46f5fa4..3004dfa 100755
--- a/rootdir/etc/init.qcom.sh
+++ b/rootdir/etc/init.qcom.sh
@@ -67,3 +67,14 @@ fi
cp /firmware/image/modem_pr/mbn_ota.txt /data/vendor/radio/modem_config
chown radio.radio /data/vendor/radio/modem_config/mbn_ota.txt
echo 1 > /data/vendor/radio/copy_complete
+
+MemTotalStr=`cat /proc/meminfo | grep MemTotal`
+MemTotal=${MemTotalStr:16:8}
+
+if [ $MemTotal -lt 5242880 ]; then
+ echo never > /sys/kernel/mm/transparent_hugepage/enabled
+ echo never > /sys/kernel/mm/transparent_hugepage/defrag
+else
+ echo madvise > /sys/kernel/mm/transparent_hugepage/enabled
+ echo madvise > /sys/kernel/mm/transparent_hugepage/defrag
+fi