android_system_core/libprocessgroup
T.J. Mercier 3984611601 libprocessgroup: Add SetSchedulerPolicy Action
Add a new profile action that allows users to set a scheduler policy and
priority for a thread when a profile with the action is applied. This
can be used with the POSIX policies specified in the sched_setscheduler
man page. A priority value is required for real-time policies. A nice
value may optionally be provided for normal policies.

If a normal policy is used and a nice value is provided, it will be
applied with setpriority() after the scheduler policy is applied. The
range of nice values that can be used in the task profiles JSON in this
case is [-20, 19].

If a real-time policy is used, the range of priorities that can be used
in the task profiles JSON is [1, 99] which will be mapped onto
[sched_get_priority_min(), sched_get_priority_max()] at runtime for the
the provided policy.

Here are some examples:

Use lowest-priority with FIFO policy:
"Actions": [
  {
    "Name": "SetSchedulerPolicy",
    "Params":
    {
      "Policy": "SCHED_FIFO",
      "Priority": 1
    }
  }
]

Use highest-priority (lowest nice) with standard NORMAL scheduler:
"Actions": [
  {
    "Name": "SetSchedulerPolicy",
    "Params":
    {
      "Policy": "SCHED_OTHER",
      "Nice": -20
    }
  }
]

Bug: 368072932
BYPASS_INCLUSIVE_LANGUAGE_REASON=false positive
Change-Id: I502ceb3913016e9f4e6b6322cc0eee905c9a5c9a
2024-10-14 21:00:11 +00:00
..
cgrouprc libprocessgroup: Rename files a_cgroup_controller.cpp, a_cgroup_file.cpp 2024-08-09 18:35:29 +00:00
cgrouprc_format libprocessgroup: Add MaxActivationDepth 2024-06-18 15:50:21 +00:00
include/processgroup libprocessgroup: Remove schedtune support 2024-10-02 14:47:45 +00:00
profiles libprocessgroup: Remove schedtune support 2024-10-02 14:47:45 +00:00
setup libprocessgroup: Convert libprocessgroup_util to static library 2024-08-12 21:15:09 +00:00
tools libprocessgroup/tools: Add settaskprofile command-line tool 2021-11-09 22:35:51 +00:00
util libprocessgroup: Convert libprocessgroup_util to static library 2024-08-12 21:15:09 +00:00
Android.bp libprocessgroup: Convert libprocessgroup_util to static library 2024-08-12 21:15:09 +00:00
build_flags.h Add build flag to split the cgroup v2 hierarchy into apps/system 2024-04-08 21:15:48 +00:00
cgroup_map.cpp libprocessgroup: Rename CgroupController -> CgroupControllerWrapper 2024-08-09 18:35:29 +00:00
cgroup_map.h libprocessgroup: Remove unused CgroupMap::SetupCgroups declaration 2024-08-09 18:35:29 +00:00
OWNERS Updating owners of libprocessgroup 2022-12-15 19:12:33 +00:00
processgroup.cpp libprocessgroup: Rename CgroupController -> CgroupControllerWrapper 2024-08-09 18:35:29 +00:00
sched_policy.cpp libprocessgroup: Remove schedtune support 2024-10-02 14:47:45 +00:00
task_profiles.cpp libprocessgroup: Add SetSchedulerPolicy Action 2024-10-14 21:00:11 +00:00
task_profiles.h libprocessgroup: Add SetSchedulerPolicy Action 2024-10-14 21:00:11 +00:00
task_profiles_test.cpp libprocessgroup: Rename CgroupController -> CgroupControllerWrapper 2024-08-09 18:35:29 +00:00
TEST_MAPPING Revert^2 "Move StagedRollbackTest from postsubmit to presubmit" 2024-06-27 01:59:14 +00:00