android_system_core/libprocessgroup
Suren Baghdasaryan ea98b60b86 libprocessgroup: Prevent error spam when tests disable all cpus in a cpuset
UserLifecycleTests test disables all Little cores in the course of the
test, which causes attempts to add a process into /dev/cpuset/restricted
cpuset cgroup to fail with ENOSPC error code, indicating that a process
is joining a cpuset cgroup with no online cpus. Current libprocessgroup
implementation will log an error on each such occurrence, which spams
the logs and makes it hard to analyze test results. Because this
situation does not happen in production environment (we do not offline
cpus), we can prevent flooding the logs by identifying this case,
logging an appropriate error one time and ignore all later similar errors.

Bug: 158766131
Test: adb shell "echo 0 > /sys/devices/system/cpu/cpu[0-3]/online"
Test: start some apps, observe libprocessgroup errors in the logcat
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
(cherry picked from commit ae42d601d0)
(cherry picked from commit 48e692cecd)
Merged-In: Ia91d8839d86787569c255481bde077be51c43d93
Change-Id: Ia91d8839d86787569c255481bde077be51c43d93
2022-03-02 18:17:55 -08:00
..
cgrouprc Replace llndk_library with llndk clause in cc_library 2021-04-21 19:13:41 -07:00
cgrouprc_format [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
include/processgroup libprocessgroup: remove hardcoded freezer path 2021-02-25 23:39:52 +00:00
profiles Merge "init.rc: Create a new group for dex2oat" into sc-v2-dev 2021-10-26 07:09:28 +00:00
setup libprocessgroup: introduce optional attribute for cgroup controllers 2021-03-11 17:42:30 +00:00
Android.bp [LSC] Add LOCAL_LICENSE_KINDS to system/core 2021-02-19 12:59:05 -08:00
cgroup_map.cpp Cgroup APIs are guarded 2021-01-12 20:50:27 +09:00
cgroup_map.h Fix IsUsable to check for each controller separately 2019-06-26 11:35:11 -07:00
OWNERS Add new owners to various sub-projects. 2020-12-11 12:45:45 -08:00
processgroup.cpp libprocessgroup: Remove unnecessary permissions change in uid/pid hierarchy 2021-07-07 19:42:03 +00:00
sched_policy.cpp libprocessgroup: fall back to cpuset in get_sched_policy 2021-12-14 10:57:05 -08:00
task_profiles.cpp libprocessgroup: Prevent error spam when tests disable all cpus in a cpuset 2022-03-02 18:17:55 -08:00
task_profiles.h libprocessgroup: Prevent error spam when tests disable all cpus in a cpuset 2022-03-02 18:17:55 -08:00