From e6aa44add47d3cfa6c9cc712341a25151c574615 Mon Sep 17 00:00:00 2001 From: Olav Haugan Date: Sun, 3 Aug 2014 15:00:32 -0700 Subject: [PATCH] msm8994: Enable msm_irqbalance The msm_irqbalance daemon starts up as root and then lower its privileges immediately to user nobody while holding on to capability to read/write files on the file system (proc). The msm_irqbalance daemon balances IRQs among available cores to ensure even IRQ load on each core. The daemon also moves IRQs away from cores that are configured to not handle any IRQs Change-Id: Ib9a8d6a12902bcdba60837d9d3ca31adea2d574f --- rootdir/etc/init.qcom.rc | 6 ++++++ rootdir/etc/init.qcom.sh | 21 +++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc index d032dc85..4a0f7bd0 100644 --- a/rootdir/etc/init.qcom.rc +++ b/rootdir/etc/init.qcom.rc @@ -811,3 +811,9 @@ service vm_bms /system/bin/vm_bms user root group root disabled + +service msm_irqbalance /system/bin/msm_irqbalance -f /system/vendor/etc/msm_irqbalance.conf + class core + user root + group root + disabled diff --git a/rootdir/etc/init.qcom.sh b/rootdir/etc/init.qcom.sh index ba765d82..941645fa 100644 --- a/rootdir/etc/init.qcom.sh +++ b/rootdir/etc/init.qcom.sh @@ -94,6 +94,23 @@ start_vm_bms() fi } +start_msm_irqbalance_8939() +{ + if [ -f /system/bin/msm_irqbalance ]; then + case "$platformid" in + "239") + start msm_irqbalance;; + esac + fi +} + +start_msm_irqbalance() +{ + if [ -f /system/bin/msm_irqbalance ]; then + start msm_irqbalance + fi +} + baseband=`getprop ro.baseband` # # Suppress default route installation during RA for IPV6; user space will take @@ -186,5 +203,9 @@ case "$target" in ;; "msm8916") start_vm_bms + start_msm_irqbalance_8939 + ;; + "msm8994") + start_msm_irqbalance ;; esac