set camera and gpu irq affinities (#2678)

* pin camera and gpu to core 2

* can't forget about 177
pull/2683/head
Adeeb Shihadeh 4 years ago committed by GitHub
parent f30d15ea24
commit 05fe01e30b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 16
      launch_chffrplus.sh

@ -17,7 +17,9 @@ function two_init {
# Wifi scan
wpa_cli IFNAME=wlan0 SCAN
# Restrict Android and other system processes to the first two cores
# *** shield cores 2-3 ***
# android gets two cores
echo 0-1 > /dev/cpuset/background/cpus
echo 0-1 > /dev/cpuset/system-background/cpus
echo 0-1 > /dev/cpuset/foreground/cpus
@ -27,7 +29,8 @@ function two_init {
# openpilot gets all the cores
echo 0-3 > /dev/cpuset/app/cpus
# set up governors
# *** set up governors ***
# +50mW offroad, +500mW onroad for 30% more RAM bandwidth
echo "performance" > /sys/class/devfreq/soc:qcom,cpubw/governor
echo 1056000 > /sys/class/devfreq/soc:qcom,m4m/max_freq
@ -43,6 +46,8 @@ function two_init {
# /sys/class/devfreq/soc:qcom,mincpubw is the only one left at "powersave"
# it seems to gain nothing but a wasted 500mW
# *** set up IRQ affinities ***
# Collect RIL and other possibly long-running I/O interrupts onto CPU 1
echo 1 > /proc/irq/78/smp_affinity_list # qcom,smd-modem (LTE radio)
echo 1 > /proc/irq/33/smp_affinity_list # ufshcd (flash storage)
@ -53,6 +58,13 @@ function two_init {
[ -d "/proc/irq/733" ] && echo 3 > /proc/irq/733/smp_affinity_list # USB for LeEco
[ -d "/proc/irq/736" ] && echo 3 > /proc/irq/736/smp_affinity_list # USB for OP3T
# GPU and camera get cpu 2
CAM_IRQS="177 178 179 180 181 182 183 184 185 186 192"
for irq in $CAM_IRQS; do
echo 2 > /proc/irq/$irq/smp_affinity_list
done
echo 2 > /proc/irq/193/smp_affinity_list # GPU
# Check for NEOS update
if [ $(< /VERSION) != "$REQUIRED_NEOS_VERSION" ]; then
if [ -f "$DIR/scripts/continue.sh" ]; then

Loading…
Cancel
Save