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
LOCAL_INIT_RC := surfaceflinger.rc
-ifneq ($(ENABLE_CPUSETS),)
- LOCAL_CFLAGS += -DENABLE_CPUSETS
-endif
-
ifeq ($(TARGET_USES_HWC2),true)
LOCAL_CFLAGS += -DUSE_HWC2
endif
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();