platform_system_core/libprocessgroup
Bart Van Assche 9c0fcbb0f7 libprocessgroup: Add I/O scheduler attributes to task_profiles.json
The differences between the v1 and v2 hierarchies are as follows:
* Different mountpoints. In Android the blkio v1 hierarchy has
  /dev/blkio as top directory while the v2 hierarchy has /sys/fs/cgroup
  as top directory.
* Different directory structure. In Android there are two directories in
  the v1 blkio hierarchy (. and background) while in the v2 hierarchy
  there is one subdirectory per process and per task.
* Different controller names. The name of the blkio controller in the v1
  hierarchy is "blkio" while it is "io" in the v2 hierarchy.
* In the v1 hierarchy the NormalIoPriority policy is applied at process
  creation time but that policy is not applied at process creation time
  if the blkio controller exists in the v2 hierarchy.

Prepare for migration of the blkio controller to the v2 hierarchy by
adding the blkio v2 attributes in task_profiles.json. All these
attributes have been marked as optional because:
* The "io" controller does not exist in the v1 hierarchy.
* Which attributes can be applied depends on the I/O scheduler that has
  been selected (CFQ, BFQ, ...).

This patch causes the following warnings to appear in the logs of
devices that mount the blkio controller in the v1 hierarchy:
 W libprocessgroup: Controller io is not found
 W libprocessgroup: Controller io is not found
 W libprocessgroup: Controller io is not found
 W libprocessgroup: SetAttribute: unknown attribute: CfqGroupIdle
 W libprocessgroup: SetAttribute: unknown attribute: CfqWeight
 W libprocessgroup: SetAttribute: unknown attribute: BfqWeight

This patch restores a subset of aosp/1962326 and prepares for the
migration of the blkcg controller to the cgroup v2 hierarchy.

Bug: 213617178
Change-Id: Ia7b117bc777239b416e2ac268308e634b018144d
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-08-25 14:01:01 -07: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: Provide SetProcessProfiles() and SetTaskProfiles() alternatives 2022-08-19 07:06:30 -07:00
profiles libprocessgroup: Add I/O scheduler attributes to task_profiles.json 2022-08-25 14:01:01 -07:00
setup libprocessgroup: Fix a log message 2022-08-08 11:07:02 -07:00
tools libprocessgroup/tools: Add settaskprofile command-line tool 2021-11-09 22:35:51 +00:00
Android.bp libprocessgroup: Switch from gnu++-17 to gnu++-20 2022-08-18 12:34:21 -07: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: Provide SetProcessProfiles() and SetTaskProfiles() alternatives 2022-08-19 07:06:30 -07:00
sched_policy.cpp libprocessgroup: fall back to cpuset in get_sched_policy 2021-12-14 10:56:34 -08:00
task_profiles.cpp libprocessgroup: Provide SetProcessProfiles() and SetTaskProfiles() alternatives 2022-08-19 07:06:30 -07:00
task_profiles.h libprocessgroup: Provide SetProcessProfiles() and SetTaskProfiles() alternatives 2022-08-19 07:06:30 -07:00
task_profiles_test.cpp Add support for optional cgroup attributes 2022-03-16 19:55:46 +00:00