From: Isaac Chen Date: Thu, 16 Feb 2017 03:51:51 +0000 (+0800) Subject: Removed build time variable ENABLE_CPUSETS. X-Git-Tag: android-x86-8.1-r1~377^2^2~25^2~7^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=391ab069b114d5012b1fa0a48c9bc2b841974970;p=android-x86%2Fframeworks-native.git Removed build time variable ENABLE_CPUSETS. Use runtime check, cpuset_enabled(), instead of build time varianble usually set in BoardConfog.mk. Bug: 34726944 Test: Tested on Sailfish without cpuset mounted with cpuset mounted, but without schedtune with cpuset mounted and with schedtune Change-Id: I00153628db62abfbaa0ba75d571ba1bda0611ff3 --- diff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk index 170faa8139..be537dcc83 100644 --- a/services/surfaceflinger/Android.mk +++ b/services/surfaceflinger/Android.mk @@ -159,10 +159,6 @@ LOCAL_CFLAGS := -DLOG_TAG=\"SurfaceFlinger\" LOCAL_INIT_RC := surfaceflinger.rc -ifneq ($(ENABLE_CPUSETS),) - LOCAL_CFLAGS += -DENABLE_CPUSETS -endif - ifeq ($(TARGET_USES_HWC2),true) LOCAL_CFLAGS += -DUSE_HWC2 endif diff --git a/services/surfaceflinger/main_surfaceflinger.cpp b/services/surfaceflinger/main_surfaceflinger.cpp index 53a63bdd9b..f151087676 100644 --- a/services/surfaceflinger/main_surfaceflinger.cpp +++ b/services/surfaceflinger/main_surfaceflinger.cpp @@ -45,12 +45,10 @@ 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 + if (cpusets_enabled()) set_cpuset_policy(0, SP_SYSTEM); // initialize before clients can connect flinger->init();