diff options
author | Yongqin Liu <yongqin.liu@linaro.org> | 2016-03-23 21:35:50 +0800 |
---|---|---|
committer | Dmitry Shmidt <dimitrysh@google.com> | 2016-03-23 15:01:54 -0700 |
commit | 16c8b0ad0ff1eb319ea171c702b573e5faa2e7c4 (patch) | |
tree | 282c4053cfe2ba4741dde5426a57437755868126 | |
parent | 0fffcdc123b3dede3925507ff473ae7ae6ccb027 (diff) | |
download | hikey-16c8b0ad0ff1eb319ea171c702b573e5faa2e7c4.tar.gz |
init.hikey.rc & BoardConfig.mk: enable cpuset correctly
set the cpu cores for cpuset correctly, otherwise there will
be only cpu0 used for foreground tasks
Change-Id: Ia6c951649a17f2dbd5fcf828d60ac787fb61f10f
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
-rw-r--r-- | BoardConfig.mk | 3 | ||||
-rw-r--r-- | init.hikey.rc | 19 |
2 files changed, 22 insertions, 0 deletions
diff --git a/BoardConfig.mk b/BoardConfig.mk index d318cd95..4309696e 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -49,6 +49,9 @@ BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 BOARD_FLASH_BLOCK_SIZE := 131072 TARGET_USE_PAN_DISPLAY := true +# enable to use the CPUSETS feature +ENABLE_CPUSETS := true + BOARD_SEPOLICY_DIRS := device/linaro/hikey/sepolicy ifeq ($(HOST_OS), linux) diff --git a/init.hikey.rc b/init.hikey.rc index 6cc0f6ff..b2e86c48 100644 --- a/init.hikey.rc +++ b/init.hikey.rc @@ -61,6 +61,25 @@ on post-fs # https://bugs.launchpad.net/bugs/1037611 chmod 0660 /dev/cpuctl + # update cpuset now that processors are up + # Foreground should contain all cores + write /dev/cpuset/foreground/cpus 0-7 + + # 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. + write /dev/cpuset/foreground/boost/cpus 0-7 + + #background contains a small subset (generally one little core) + write /dev/cpuset/background/cpus 0 + + # add system-background cpuset, a new cpuset for system services + # that should not run on larger cores + # system-background is for system tasks that should only run on + # little cores, not on bigs to be used only by init + write /dev/cpuset/system-background/cpus 0-4 + # enable Google-specific location features, # like NetworkLocationProvider and LocationCollector setprop ro.com.google.locationfeatures 1 |