lowmem: Modify to move cgroup when pid is child 44/309044/1 accepted/tizen/8.0/unified/20240405.142053
authorSangYoun Kwak <sy.kwak@samsung.com>
Thu, 4 Apr 2024 06:38:53 +0000 (15:38 +0900)
committerSangYoun Kwak <sy.kwak@samsung.com>
Thu, 4 Apr 2024 06:38:53 +0000 (15:38 +0900)
commit55907213fafed65afb9709045781db93d02782b6
treee21bac088b94db087b2bbba0400470f8bbff0773
parentdccd0c55bb4062ba9e1e19d7fb04253ee23a428d
lowmem: Modify to move cgroup when pid is child

Previously, if pid is child's pid and try to move cgroup of it,
resourced does nothing because child pids should be moved with their
parent process.

In the case of Android app, its pid should be grouped with its
corresponding dummy app(Tizen app, android-launcher), but it is treated
as a child of dummy app, resourced does nothing and it is not registered
to the cgroup's tasks.

To fix this issue, modify to call lowmem_limit_move_cgroup() to write
all pids of parent process even if the target(to move cgroup) is child
pid.

Change-Id: I0fd516025e2f0dddd4571f5325c54ef44296bc1c
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
src/resource-limiter/memory/lowmem-controller.c