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

Commit 45d921c1 authored by T.J. Mercier's avatar T.J. Mercier
Browse files

Fix race applying SystemMemoryProcess for system_server

When UsePerAppMemcg is true, we intend for system_server to be placed in
the root of the system memcg instead of its own per-app memcg. The
current implementation suffers from a race, since the memcg migration is
performed by the parent process (Zygote) when there is no guarantee
cgroup setup (createProcessGroup) has been completed in the child. This
can result in system_server being migrated to the system memcg initially
only to be migrated again later to a per-app memcg.

Fix this by moving the system_server migration from Zygote to
system_server after cgroup setup is completed.

Test: $ adb wait-for-device shell 'grep memory /proc/`pidof system_server`/cgroup'
Test: 4:memory:/system
Flag: EXEMPT bugfix
Bug: 434785097
Change-Id: I0952e747325a4cdeefe7491566293fd33230d2b4
parent ce79db49
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment