summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2016-03-10 18:17:45 -0800
committerSteve Kondik <steve@cyngn.com>2016-03-10 18:17:45 -0800
commita98331d1ae08eb57a4829674ce05f50de80c169c (patch)
treef6ff1a51d6e1b773781f6d71ddfd564f0a26237e /services
parentefd11d3c0bd9dab4f83398acab27226b73da774f (diff)
parent6df23e81f762ec7bdf3d575582ad51aaef5172cf (diff)
downloadframeworks_native-a98331d1ae08eb57a4829674ce05f50de80c169c.zip
frameworks_native-a98331d1ae08eb57a4829674ce05f50de80c169c.tar.gz
frameworks_native-a98331d1ae08eb57a4829674ce05f50de80c169c.tar.bz2
Merge tag 'android-6.0.1_r22' of https://android.googlesource.com/platform/frameworks/native into cm-13.0
Android 6.0.1 release 22
Diffstat (limited to 'services')
-rw-r--r--services/surfaceflinger/Android.mk4
-rw-r--r--services/surfaceflinger/main_surfaceflinger.cpp7
2 files changed, 11 insertions, 0 deletions
diff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk
index c2b74ed..37ad4ac 100644
--- a/services/surfaceflinger/Android.mk
+++ b/services/surfaceflinger/Android.mk
@@ -141,6 +141,10 @@ LOCAL_LDFLAGS := -Wl,--version-script,art/sigchainlib/version-script.txt -Wl,--e
LOCAL_CFLAGS := -DLOG_TAG=\"SurfaceFlinger\"
LOCAL_CPPFLAGS := -std=c++11
+ifneq ($(ENABLE_CPUSETS),)
+ LOCAL_CFLAGS += -DENABLE_CPUSETS
+endif
+
LOCAL_SRC_FILES := \
main_surfaceflinger.cpp
diff --git a/services/surfaceflinger/main_surfaceflinger.cpp b/services/surfaceflinger/main_surfaceflinger.cpp
index 6127cf6..e8464a3 100644
--- a/services/surfaceflinger/main_surfaceflinger.cpp
+++ b/services/surfaceflinger/main_surfaceflinger.cpp
@@ -42,6 +42,13 @@ int main(int, char**) {
set_sched_policy(0, SP_FOREGROUND);
+#ifdef ENABLE_CPUSETS
+ // Put most SurfaceFlinger threads in the system-background cpuset
+ // Keeps us from unnecessarily using big cores
+ // Do this after the binder thread pool init
+ set_cpuset_policy(0, SP_SYSTEM);
+#endif
+
// initialize before clients can connect
flinger->init();