android_system_core/libprocessgroup
Suren Baghdasaryan 1e81ee1363 libprocessgroup: optimize SetAttributeAction::ExecuteForProcess performance
Current implementation of SetAttributeAction::ExecuteForProcess reuses
SetAttributeAction::ExecuteForTask while not utilizing available uid/pid
information. This results in a call to GetPathForTask() which is an
expensive function due to it reading and parsing /proc/$pid/cgroups.
This can be avoided if we utilize available uid/pid info and the fact
that cgroup v2 attributes share the cgroup v2 hierarchy as process
groups, which use a known path template.

Bug: 292636609
Change-Id: I02e3046bd85d0dfebc68ab444f1796bb54cc69c7
Merged-In: I02e3046bd85d0dfebc68ab444f1796bb54cc69c7
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
(cherry picked from commit 961c01ce23)
2023-07-31 22:33:27 +00:00
..
cgrouprc Annotate symbols correctly 2022-09-26 22:14:43 +09:00
cgrouprc_format
include/processgroup libprocessgroup: implement task profile validity checks 2023-05-01 11:51:31 -07:00
profiles Revert "libprocessgroup: Add I/O scheduler attributes to task_profiles.json" 2023-05-12 16:35:06 -07:00
setup libprocessgroup: Rework SetupCgroup() 2023-02-10 14:18:38 -08:00
tools
Android.bp libprocessgroup: Switch from gnu++-17 to gnu++-20 2022-08-18 12:34:21 -07:00
OWNERS Updating owners of libprocessgroup 2022-12-15 19:12:33 +00:00
cgroup_map.cpp libprocessgroup: Proceed if activation of an optional controller fails 2023-02-10 15:02:44 -08:00
cgroup_map.h
processgroup.cpp libprocessgroup: implement task profile validity checks 2023-05-01 11:51:31 -07:00
sched_policy.cpp
task_profiles.cpp libprocessgroup: optimize SetAttributeAction::ExecuteForProcess performance 2023-07-31 22:33:27 +00:00
task_profiles.h libprocessgroup: optimize SetAttributeAction::ExecuteForProcess performance 2023-07-31 22:33:27 +00:00
task_profiles_test.cpp libprocessgroup: optimize SetAttributeAction::ExecuteForProcess performance 2023-07-31 22:33:27 +00:00