From 18a3ebde61e1f0d5bee5336f7ca292ea9d7586f0 Mon Sep 17 00:00:00 2001 From: Gopal Iyer Date: Tue, 22 Sep 2020 10:52:36 -0700 Subject: [PATCH] miatoll: rootdir: Tune UFS clock scaling during bootup Disabling UFS clock scaling during boot time helps in reducing IO delays, which helps in reducing the total boot time. This change will disable UFS clock scaling during early-init and enable it back after boot completion. Change-Id: Ib3490a8155610aea399ac2f63aa4a71bee299c6e Signed-off-by: Adithya R --- rootdir/etc/init.device.rc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/rootdir/etc/init.device.rc b/rootdir/etc/init.device.rc index d0e7d23..ba2a2e6 100644 --- a/rootdir/etc/init.device.rc +++ b/rootdir/etc/init.device.rc @@ -23,10 +23,15 @@ on init && property:ro.boot.hwname=joyeuse setprop ro.boot.product.hardware.sku joyeuse start vendor.nfc_hal_service +# perf tuning on property:persist.sys.device_provisioned=1 setprop dalvik.vm.dex2oat-cpu-set 0,1,2,3,4,5,7 setprop dalvik.vm.dex2oat-threads 6 +on early-init + # Disable UFS clock scaling + write /sys/bus/platform/devices/1d84000.ufshc/clkscale_enable 0 + on late-init # Start services for bootanim start surfaceflinger @@ -35,7 +40,10 @@ on late-init start vendor.configstore-hal start vendor.qti.hardware.display.allocator -# perf tuning +on property:sys.boot_completed=1 + # Enable UFS clock scaling back + write /sys/bus/platform/devices/1d84000.ufshc/clkscale_enable 1 + on property:vendor.post_boot.parsed=1 # Setup runtime cpusets write /dev/cpuset/top-app/cpus 0-7