sdm660: rootdir: Enable sys.use_fifo_ui prop if EAS is present

* When sys.use_fifo_ui is enabled, ActivityManager tracks the UI thread and RenderThread (the two most UI-critical threads) of the top application and makes those threads SCHED_FIFO instead of SCHED_OTHER. This effectively eliminates jitter from UI and RenderThreads; the traces that've gathered with this option enabled show runnable times on the order of microseconds instead of milliseconds.
* However, it should be enabled only when we have EAS i.e a capacity-aware RT scheduler because if RT load balancer is not capacity-aware, then there would be a 30% reduction in application startup performance.

Reference: https://source.android.com/devices/tech/debug/jank_jitter

Signed-off-by: Saurabh Charde <saurabhchardereal@gmail.com>
Signed-off-by: Aston-Martinn <advaithbhat9@gmail.com>
Change-Id: I8b55ad1899be985fc7357abaf06d68d6a130fb75
This commit is contained in:
Saurabh 2019-08-13 22:20:31 +05:30 committed by OdSazib
parent e007445fe5
commit 3501d248b5
No known key found for this signature in database
GPG key ID: CB336514F9F5CF69
2 changed files with 9 additions and 4 deletions

View file

@ -166,10 +166,6 @@ PRODUCT_PROPERTY_OVERRIDES += \
debug.sf.high_fps_early_gl_phase_offset_ns=9000000 \
debug.sf.phase_offset_threshold_for_next_vsync_ns=6100000
# FIFO scheduling for UI
PRODUCT_PROPERTY_OVERRIDES += \
sys.use_fifo_ui=1
# Fling
PRODUCT_PROPERTY_OVERRIDES += \
ro.min.fling_velocity=160 \

View file

@ -5964,3 +5964,12 @@ esac
misc_link=$(ls -l /dev/block/bootdevice/by-name/misc)
real_path=${misc_link##*>}
setprop persist.vendor.mmi.misc_dev_path $real_path
# set sys.use_fifo_ui prop if eas exist
available_governors=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors)
if echo "$available_governors" | grep schedutil; then
echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "schedutil" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
setprop sys.use_fifo_ui 1
fi