From 3cb0fe679bffed2c748053007241631f3b931d7a Mon Sep 17 00:00:00 2001 From: Thierry Strudel Date: Fri, 28 Oct 2016 15:22:03 -0700 Subject: [PATCH] enable CPUSETS and feel the speed Change-Id: Ic3d48591792b474072c545afa0c68c69d5841abc --- CommonBoardConfig.mk | 2 ++ init.hardware.rc | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/CommonBoardConfig.mk b/CommonBoardConfig.mk index 60df5a3..5ae94c7 100644 --- a/CommonBoardConfig.mk +++ b/CommonBoardConfig.mk @@ -44,6 +44,8 @@ TARGET_BOARD_KERNEL_HEADERS := device/google/muskie/kernel-headers TARGET_NO_BOOTLOADER := true +ENABLE_CPUSETS := true + TARGET_COPY_OUT_VENDOR := system/vendor # Install odex files into the other system image diff --git a/init.hardware.rc b/init.hardware.rc index 9ab1251..2acb6c4 100644 --- a/init.hardware.rc +++ b/init.hardware.rc @@ -173,6 +173,20 @@ on post-fs-data on early-boot exec - root root system -- /system/bin/init.power.sh + # update cpusets now that processors are up + # initialize for Silver Only first and then Silver + Gold + # Silver Only configuration cannot work with 0-7 + write /dev/cpuset/top-app/cpus 0-3 + write /dev/cpuset/foreground/cpus 0-3 + write /dev/cpuset/foreground/boost/cpus 0-3 + write /dev/cpuset/background/cpus 0-3 + write /dev/cpuset/system-background/cpus 0-3 + write /dev/cpuset/top-app/cpus 0-7 + write /dev/cpuset/foreground/cpus 0-7 + write /dev/cpuset/foreground/boost/cpus 0-7 + write /dev/cpuset/background/cpus 0-7 + write /dev/cpuset/system-background/cpus 0-7 + on boot mkdir /dev/socket/qmux_radio 0770 radio radio chmod 2770 /dev/socket/qmux_radio