Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01add041 authored by Tim Murray's avatar Tim Murray Committed by Android (Google) Code Review
Browse files

Merge "Set cpuset from surfaceflinger."

parents 7c115d01 ac8d239d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -124,6 +124,10 @@ LOCAL_CPPFLAGS := -std=c++11

LOCAL_INIT_RC := surfaceflinger.rc

ifneq ($(ENABLE_CPUSETS),)
    LOCAL_CFLAGS += -DENABLE_CPUSETS
endif

LOCAL_SRC_FILES := \
    main_surfaceflinger.cpp

+7 −0
Original line number Diff line number Diff line
@@ -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();

+1 −1
Original line number Diff line number Diff line
@@ -3,4 +3,4 @@ service surfaceflinger /system/bin/surfaceflinger
    user system
    group graphics drmrpc readproc
    onrestart restart zygote
    writepid /dev/cpuset/system-background/tasks /sys/fs/cgroup/stune/foreground/tasks
    writepid /sys/fs/cgroup/stune/foreground/tasks