summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2016-09-19 15:32:26 +0100
committerYongqin Liu <yongqin.liu@linaro.org>2016-09-19 18:02:21 +0100
commitf39a1dccd532633bfb03e0bd99a79e486dcfdc18 (patch)
treeeb1676c6540a9fe7e4af537cc2fa485eca557317
parentb7cb91a0125f940ba64dc8f99b6e7f3d245a0f0f (diff)
downloadjuno-RLCR-16.09.tar.gz
cpuset settings for using EAS efficiently.RLCR-16.09
set cpuset top-app with all cpus, and enabled ENABLE_SCHEDBOOST Change-Id: I6b7e777cfb65de52465cb803ce18eda09da19dca Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
-rw-r--r--BoardConfig.mk3
-rwxr-xr-xsetcpuset.sh24
2 files changed, 15 insertions, 12 deletions
diff --git a/BoardConfig.mk b/BoardConfig.mk
index 946a5f5..1408fef 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -30,7 +30,8 @@ USE_OPENGL_RENDERER := true
BIONIC_TESTS ?= true
ENABLE_CPUSETS := true
-ENABLE_SCHED_BOOST := true
+ENABLE_SCHEDBOOST := true
+ENABLE_SCHED_BOOST := false
ifeq ($(strip $(USE_LINARO_TOOLCHAIN)),true)
# 64bit toolchain
diff --git a/setcpuset.sh b/setcpuset.sh
index bf1da87..573a54e 100755
--- a/setcpuset.sh
+++ b/setcpuset.sh
@@ -3,6 +3,8 @@
BIG_CPUS=
LITTLE_CPUS=
FIRST_LITTLE_CPU=
+FIRST_BIG_CPU=
+ALL_CPUS_NO_FIRST_BIG_CPU=
ALL_CPUS=
for cpufile in /sys/devices/system/cpu/cpu*/uevent; do
cpunum=${cpufile#/sys/devices/system/cpu/cpu}
@@ -14,28 +16,28 @@ for cpufile in /sys/devices/system/cpu/cpu*/uevent; do
elif grep -q -e 'cortex-a57' -e 'cortex-a72' $cpufile; then
echo CPU $cpunum is big core
BIG_CPUS=${BIG_CPUS:+$BIG_CPUS,}$cpunum
+ FIRST_BIG_CPU=${FIRST_BIG_CPU:-$cpunum}
else
echo CPU $cpunum is unknown type
fi
ALL_CPUS=${ALL_CPUS:+$ALL_CPUS,}$cpunum
+ # not consider the case that there is no big cp on line
+ if [ "X$cpunum" != "X$FIRST_BIG_CPU" ]; then
+ ALL_CPUS_NO_FIRST_BIG_CPU=${ALL_CPUS_NO_FIRST_BIG_CPU:+$ALL_CPUS_NO_FIRST_BIG_CPU,}$cpunum
+ fi
done
echo BIG_CPUS=$BIG_CPUS
echo LITTLE_CPUS=$LITTLE_CPUS
echo FIRST_LITTLE_CPU=$FIRST_LITTLE_CPU
+echo FIRST_BIG_CPU=$FIRST_BIG_CPU
+echo ALL_CPUS_NO_FIRST_BIG_CPU=$ALL_CPUS_NO_FIRST_BIG_CPU
# Foreground should contain all cores
-echo $ALL_CPUS >/dev/cpuset/foreground/cpus
+# Reserve first big cpu for top-app
+echo ${ALL_CPUS_NO_FIRST_BIG_CPU:-$ALL_CPUS} >/dev/cpuset/foreground/cpus
-# Add foreground/boost cpuset, it is used for app launches,
-# and maybe other high priority tasks in the future.
-# It's to be set to whatever cores should be used
-# for short term high-priority tasks.
-if [ -n "${BIG_CPUS}" ]; then
- echo $BIG_CPUS >/dev/cpuset/foreground/boost/cpus
-else
- # set with all cpus if not found any BIG_CPUS
- echo $ALL_CPUS >/dev/cpuset/foreground/boost/cpus
-fi
+# top-app gets all cpus
+echo $ALL_CPUS >/dev/cpuset/top-app/cpus
#background contains a small subset (generally one little core)
if [ -n "${FIRST_LITTLE_CPU}" ]; then