diff options
author | Tim Murray <timmurray@google.com> | 2015-11-10 14:29:45 -0800 |
---|---|---|
committer | Tim Murray <timmurray@google.com> | 2015-11-18 19:58:04 +0000 |
commit | 392db573b35d6fe09c4da094ed81c54ed528a511 (patch) | |
tree | be49c03520b36e6f194f1eb6ffdde4f5bbd07a92 /services/surfaceflinger | |
parent | bc9bc0e0fc75097e48feff9bb954de648930817c (diff) | |
download | frameworks_native-392db573b35d6fe09c4da094ed81c54ed528a511.zip frameworks_native-392db573b35d6fe09c4da094ed81c54ed528a511.tar.gz frameworks_native-392db573b35d6fe09c4da094ed81c54ed528a511.tar.bz2 |
Set cpuset from surfaceflinger.
SurfaceFlinger shouldn't be limited to little cores exclusively, as the
binder threads should be placed on big cores when they are in the
critical path for a RenderThread.
bug 25745866
Change-Id: I9fb65f6d951733f91b4735ff27018411b58b2bfb
Diffstat (limited to 'services/surfaceflinger')
-rw-r--r-- | services/surfaceflinger/Android.mk | 4 | ||||
-rw-r--r-- | services/surfaceflinger/main_surfaceflinger.cpp | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk index 1eb2361..1901ef9 100644 --- a/services/surfaceflinger/Android.mk +++ b/services/surfaceflinger/Android.mk @@ -122,6 +122,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 a74bc4c..6fa8b53 100644 --- a/services/surfaceflinger/main_surfaceflinger.cpp +++ b/services/surfaceflinger/main_surfaceflinger.cpp @@ -41,6 +41,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(); |