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
This commit is contained in:
parent
bc9bc0e0fc
commit
392db573b3
@ -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
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user