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

Commit 8a4a143c authored by Chao Feng's avatar Chao Feng Committed by Rick Yiu
Browse files

thread cgroup: Modify the order of top-app cgroup

As android B newly added foreground_window cgroup in the middle,
the thread cgroups have changed and the boost applied to top-app is not applied.

To maintain TOP_APP_GROUP_ID at 30,so move foreground_window to end.

Bug: 398758796
Test: Test taobao app cold launch
Change-Id: I72838afca84d0decd98c4ed4f670bd17946c33a1
parent 2e2ae675
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -116,13 +116,14 @@ on init

    # cpuctl hierarchy for devices using utilclamp
    mkdir /dev/cpuctl/foreground
    mkdir /dev/cpuctl/foreground_window
    mkdir /dev/cpuctl/background
    mkdir /dev/cpuctl/top-app
    mkdir /dev/cpuctl/rt
    mkdir /dev/cpuctl/system
    mkdir /dev/cpuctl/system-background
    mkdir /dev/cpuctl/dex2oat
    # move foreground_window to the bottom to preserve the original order
    mkdir /dev/cpuctl/foreground_window
    chown system system /dev/cpuctl
    chown system system /dev/cpuctl/foreground
    chown system system /dev/cpuctl/foreground_window
@@ -313,9 +314,6 @@ on init
    mkdir /dev/cpuset/foreground
    copy /dev/cpuset/cpus /dev/cpuset/foreground/cpus
    copy /dev/cpuset/mems /dev/cpuset/foreground/mems
    mkdir /dev/cpuset/foreground_window
    copy /dev/cpuset/cpus /dev/cpuset/foreground_window/cpus
    copy /dev/cpuset/mems /dev/cpuset/foreground_window/mems
    mkdir /dev/cpuset/background
    copy /dev/cpuset/cpus /dev/cpuset/background/cpus
    copy /dev/cpuset/mems /dev/cpuset/background/mems
@@ -336,6 +334,11 @@ on init
    copy /dev/cpuset/cpus /dev/cpuset/top-app/cpus
    copy /dev/cpuset/mems /dev/cpuset/top-app/mems

    # move foreground_window to the bottom to preserve the original order
    mkdir /dev/cpuset/foreground_window
    copy /dev/cpuset/cpus /dev/cpuset/foreground_window/cpus
    copy /dev/cpuset/mems /dev/cpuset/foreground_window/mems

    # create a cpuset for camera daemon processes
    mkdir /dev/cpuset/camera-daemon
    copy /dev/cpuset/cpus /dev/cpuset/camera-daemon/cpus