platform_system_core/libprocessgroup
Suren Baghdasaryan fd933786d8 libprocessgroup: Handle temporarily non-empty group removal failure
Cgroup removal fails with EBUSY if there are active processes or threads
still alive in the cgroup. Occasionally a thread or a process might be
stuck in an interruptible sleep and take some time during exit. In such
cases attempts to remove the cgroup it belongs to will fail. This
results in occasional leftover cgroups. These empty unused cgroups
consume memory.
Ensure RemoveProcessGroup always retries and increase the retries to
keep trying for 2 secs before giving up. In majority of cases only a few
retries are needed but in rare cases a thread can be blocked for longer
time, therefore the number of retries is set large enough to cover them.

Bug: 233319780
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I2e4bb1f7b7e19c904c85faea7bbabbfdef9c8125
2022-06-03 21:15:14 +00:00
..
cgrouprc Fix compiling libprocessgroup against musl 2021-09-14 12:35:01 -07:00
cgrouprc_format [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
include/processgroup libprocessgroup: Add a function to remove only empty process groups 2022-04-29 10:17:17 -07:00
profiles Rename VMCompilationPerformance to SCHED_SP_COMPUTE 2022-05-23 11:06:09 -07:00
setup Canonicalize cgroup paths 2022-03-25 16:11:45 -07:00
tools libprocessgroup/tools: Add settaskprofile command-line tool 2021-11-09 22:35:51 +00:00
Android.bp Add support for optional cgroup attributes 2022-03-16 19:55:46 +00:00
cgroup_map.cpp Micro-optimize CgroupMap::ActivateControllers() 2022-02-15 00:09:34 +00:00
cgroup_map.h libprocessgroup: Add CgroupGetControllerFromPath API function 2021-11-08 21:24:33 +00:00
OWNERS Add new owners to various sub-projects. 2020-12-11 12:45:45 -08:00
processgroup.cpp libprocessgroup: Handle temporarily non-empty group removal failure 2022-06-03 21:15:14 +00:00
sched_policy.cpp libprocessgroup: fall back to cpuset in get_sched_policy 2021-12-14 10:56:34 -08:00
task_profiles.cpp Reland "libprocessgroup: return false on failure" 2022-04-13 18:50:12 +00:00
task_profiles.h Add support for memcg v2 attributes 2022-03-17 14:18:14 -07:00
task_profiles_test.cpp Add support for optional cgroup attributes 2022-03-16 19:55:46 +00:00