summaryrefslogtreecommitdiff
path: root/libprocessgroup/profiles
Commit message (Collapse)AuthorAgeFilesLines
* Make VMCompilationPerformance an aggregated profile with defaultVictor Hsieh2022-05-161-13/+4
| | | | | | | | | | | | | | | | | | | | | | The VMCompilationPerformance profile is used to run Isolated Compilation in a Protected VM, normally during the device idle, where relevant APEXes are staged. The original VMCompilationPerformance introduced in aosp/2060891 does not have any specific definition and requires vendors to customize it. This change re-defines it as an aggregated profile with a default set of existing profiles, so that performance can be reasonable by default. This profile may be renamed to a more generic name later, e.g. "SCHED_SP_COMPUTE". Bug: 231437770 Test: Run `composd_cmd test-compile` on a local device. Before: 1m50s +/- 10s (with whatever that's default) After: 1m25s +/- 5s Ignore-AOSP-First: cherry pick from aosp/2097065 Change-Id: Ib8cd65782c818474fb129efbd9ef9a3e23ad1eb3 Merged-In: Ib8cd65782c818474fb129efbd9ef9a3e23ad1eb3
* Add profile for VM compilationRick Yiu2022-04-191-1/+13
| | | | | | | | Add VMCompilationPerformance. Bug: 223790172 Test: build pass Change-Id: I27b939ddee4b039ba3037195a4f23c823bf9c8ff
* Revert "Migrate the blkio controller to the v2 cgroup hierarchy"Bart Van Assche2022-03-302-111/+19
| | | | | | | | | | | | | | | | | | | | | | | Revert "Migrate the blkio controller to the cgroup v2 hierarchy" Revert "Migrate the blkio controller to the cgroup v2 hierarchy" Revert "Migrate the blkio controller to the cgroup v2 hierarchy" Revert submission 1962326-blkio-cgroup-v2 Reason for revert: This set of changes is suspected to have caused a redfin boot time regression for the git_tm-dev branch. Reverted Changes: Id18d876b6:Migrate the blkio controller to the cgroup v2 hier... I7dfa52136:Migrate the blkio controller to the v2 cgroup hier... I5336167be:Migrate the blkio controller to the cgroup v2 hier... I3f0131d8f:Migrate the blkio controller to the cgroup v2 hier... Ibb62b2d4d:Migrate the blkio controller to the cgroup v2 hier... Bug: 227382327 Bug: 227389363 Change-Id: I6c8183ed1c3044c8947c4fca07799deff98101b3
* Migrate the blkio controller to the v2 cgroup hierarchyBart Van Assche2022-03-282-19/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch preserves the following parameter values: * Foreground BFQ weight: 100 * Foreground CFQ group_idle: 0 * Foreground CFQ weight: 1000 * Background BFQ weight: 10 * Background CFQ group_idle: 0 * Background CFQ weight: 200 The foreground BFQ weight in task_profiles.json is the default BFQ weight. From https://www.kernel.org/doc/Documentation/block/bfq-iosched.txt: "weight (namely blkio.bfq.weight or io.bfq-weight): the weight of the group inside its parent. Available values: 1..10000 (default 100). The linear mapping between ioprio and weights, described at the beginning of the tunable section, is still valid, but all weights higher than IOPRIO_BE_NR*10 are mapped to ioprio 0." Bug: 213617178 Test: Booted Android in Cuttlefish and ran the following test: Test: adb -e shell cat /sys/fs/cgroup/*/*/io.bfq.weight | sort | uniq -c Test: 22 default 10 Test: 98 default 100 Change-Id: I7dfa521363a316592852fecce9192708c7a90514 Signed-off-by: Bart Van Assche <bvanassche@google.com>
* Add support for memcg v2 attributesBart Van Assche2022-03-172-4/+32
| | | | | | | | | | | | | | | | | | | | | Some but not all memcg v1 attributes exist in the v2 hierarchy. The following information comes from Shakeel Butt and Kamil Yurtsever, "cgroup v2 migration at Google", Linux Plumbers Conference 2018 ( https://lpc.events/event/2/contributions/204/attachments/143/378/LPC2018-cgroup-v2.pdf ): v1 v2 -------------------------- ---------- memory.limit_in_bytes memory.max memory.soft_limit_in_bytes memory.low Add support for cgroup attributes that have different names in the v1 and v2 hierarchies. Also add those memcg attributes that are used in lmkd. Bug: 213617178 Test: Tested lmkd with v1 and v2 memcg. Change-Id: Ia5c5f02974f3b783d5cdaad85b33169ced8db55f Signed-off-by: Bart Van Assche <bvanassche@google.com>
* Add support for optional cgroup attributesBart Van Assche2022-03-161-1/+2
| | | | | | | | | | | Cgroup attributes like io.weight or io.bfq.weight only exist if the corresponding I/O scheduler has been loaded. Hence add support for ignoring failures to write to a cgroup attribute that does not exist. Bug: 213617178 Test: This patch has been tested in combination with patch "Migrate the blkio controller to the cgroup v2 hierarchy". Change-Id: I5debafabc4dd430a1b98ea343bf3740c764edcc3 Signed-off-by: Bart Van Assche <bvanassche@google.com>
* Fix cgroup directory permissionsBart Van Assche2022-03-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | Cgroup attributes are set from three different contexts: (1) From the process that creates the cgroup directories. These processes are /system/bin/init, zygote and zygote64. (2) From the created process. Some but not all created processes have user ID and/or group ID 'system'. (3) The system_server process modifies certain cgroup attributes from other processes. Allow all processes from the system group, including system_server, to modify cgroup attributes from other processes. As one can see in init.rc, that file includes commands for granting the system group write permission for blkcg attributes. See also https://cs.android.com/android/platform/superproject/+/master:system/core/rootdir/init.rc Bug: 213617178 Test: Verified in the Cuttlefish emulator that this patch makes the Test: io.bfq.weight write errors disappear from logcat. Change-Id: Idbfb49c25afec12b21daea7a17db5322bc981ff0 Signed-off-by: Bart Van Assche <bvanassche@google.com>
* Simplify cgroups.jsonBart Van Assche2022-03-151-4/+1
| | | | | | | | | | | cgroups.json causes the following changes to be applied twice to /sys/fs/cgroup: change user ID to system, change group ID to system and change mode to 0755. Apply these settings once instead of twice. Bug: 213617178 Test: Ran ls -ld /sys/fs/cgroup in Cuttlefish. Change-Id: Ieb953c186c027b989599cbbaa70a9c9324678cdf Signed-off-by: Bart Van Assche <bvanassche@google.com>
* Add a profile for OTARick Yiu2021-12-091-0/+4
| | | | | | | | Add an aggregated profile, OtaProfiles, for OTA process. Bug: 199006579 Test: build pass Change-Id: Ie6d5c593096d6ca77cdd8e3765b21bfcfd6641a5
* init.rc: Create a new group for dex2oatRick Yiu2021-10-224-5/+53
| | | | | | | | | Create a new group for dex2oat in cpu cgroup, which is dedicated for dex2oat processes. Also modify task profiles for this change. Bug: 201223712 Test: dex2oat group created Change-Id: Ic61f4b8a64d01c03549b680970805e12b9ce4fcc
* task_profiles: add ServicePerformance to legacy device policyWei Wang2021-10-063-0/+39
| | | | | | | | | | Since we are adding SCHED_SP_SYSTEM into framework, the policy is needed on older releases as well. Bug: 201428466 Test: Build Signed-off-by: Wei Wang <wvw@google.com> Change-Id: I0784820bfec84fd8ef98f2feb2caee084d0a14a2
* task_profiles.json: add taskprofile for dex2oat boot_complete policyWei Wang2021-07-121-1/+5
| | | | | | | | | | | | | | | Since installation time is also critical and sometime we want a finer control on its behavior for vendor. Instead of set dex2oat to background group, add a new task profile. The default policy is to mirror SP_BACKGROUND to be compatible with legacy devices. Test: Boot Bug: 188947181 Signed-off-by: Wei Wang <wvw@google.com> Change-Id: I7d5e113d1c368205f712eadad27775de226131ce (cherry picked from commit 3745ce7aa84e9007c94cb64ac631f4fa15efe051)
* task_profiles.json: add taskprofile for SurfaceFlingerWei Wang2021-06-151-0/+27
| | | | | | | | | | | | | In some platforms, setting a different cpuset (or remove it) and/or uclamp setting is beneficial to both performance and power. Adding 2 separate profiles for vendor to override surfaceflinger scheduling policies. Bug: 170507315 Test: build and boot Signed-off-by: Wei Wang <wvw@google.com> Change-Id: Ib313fd67c6ccd701109c5683d8dbab9ecd1580d8 (cherry picked from commit 6d6b71e582251bc8935e0d4f21362f5753a8d8ef)
* task_profiles.json: use cgroup v2 uid/pid freezerLi Li2021-04-101-32/+6
| | | | | | | | Bug: 184800106 Bug: 184893012 Test: Verify the app status in frozen and unfrozen states. Change-Id: Ic27529d71839076a0ac816383b52ec28c5d17be5
* libprocessgroup: introduce optional attribute for cgroup controllersSuren Baghdasaryan2021-03-113-3/+6
| | | | | | | | | | | | | | | | | | | | | Memory cgroup controller is not used by high-end Android devices and is disabled in Android kernels 5.10+, however Android Go devices still require this controller. Similarly schedtune controller is being replaced with cpu controller's utilclamp feature, however some devices are using older kernels which only support schedtune. To prevent spamming logcat with errors we need a way to mark a controller optional in such cases without removing it from cgroups.json file. Introduce "Optional" attribute to cgroup controller's cgroups.json description to accomodate these cases. When an optional controller fails to mount due to lack of support in the kernel it will log an informational message without generating further errors. Bug: 181866655 Test: boot and observe libprocessgroup messages in logcat Signed-off-by: Suren Baghdasaryan <surenb@google.com> Change-Id: Ib5bcfdd8d338704f3f9d8b326d8ddd88b67915a1
* libprocessgroup: new method to get cgroup pathsMarco Ballesio2021-02-241-1/+1
| | | | | | Bug: 180056337 Test: Verified the app freezer is correctly enabled via logs Change-Id: I3d954dd9bb0f1fa509a275d587e603f33a9d563f
* [LSC] Add LOCAL_LICENSE_KINDS to system/coreBob Badour2021-02-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added SPDX-license-identifier-Apache-2.0 to: bootstat/Android.bp cli-test/Android.bp code_coverage/Android.bp cpio/Android.bp debuggerd/crasher/Android.bp debuggerd/proto/Android.bp diagnose_usb/Android.bp fs_mgr/libdm/Android.bp fs_mgr/libfiemap/Android.bp fs_mgr/liblp/Android.bp fs_mgr/libsnapshot/Android.bp fs_mgr/libstorage_literals/Android.bp fs_mgr/libvbmeta/Android.bp fs_mgr/tests/Android.bp fs_mgr/tools/Android.bp gatekeeperd/Android.bp healthd/Android.bp healthd/testdata/Android.bp init/Android.bp init/Android.mk init/sysprop/Android.bp init/test_kill_services/Android.bp init/test_service/Android.bp libappfuse/Android.bp libasyncio/Android.bp libbinderwrapper/Android.bp libcrypto_utils/Android.bp libcrypto_utils/tests/Android.bp libdiskconfig/Android.bp libgrallocusage/Android.bp libkeyutils/mini_keyctl/Android.bp libmodprobe/Android.bp libnetutils/Android.bp libpackagelistparser/Android.bp libprocessgroup/Android.bp libprocessgroup/cgrouprc/Android.bp libprocessgroup/cgrouprc_format/Android.bp libprocessgroup/profiles/Android.bp libprocessgroup/setup/Android.bp libqtaguid/Android.bp libsparse/Android.bp libstats/push_compat/Android.bp libsuspend/Android.bp libsync/Android.bp libsystem/Android.bp libsysutils/Android.bp libusbhost/Android.bp libutils/Android.bp libvndksupport/Android.bp libvndksupport/tests/Android.bp llkd/Android.bp llkd/tests/Android.bp property_service/libpropertyinfoparser/Android.bp property_service/libpropertyinfoserializer/Android.bp property_service/property_info_checker/Android.bp qemu_pipe/Android.bp reboot/Android.bp rootdir/Android.bp rootdir/Android.mk rootdir/avb/Android.bp rootdir/avb/Android.mk run-as/Android.bp sdcard/Android.bp set-verity-state/Android.bp shell_and_utilities/Android.bp storaged/Android.bp toolbox/Android.bp trusty/apploader/Android.bp trusty/confirmationui/Android.bp trusty/confirmationui/fuzz/Android.bp trusty/coverage/Android.bp trusty/fuzz/Android.bp trusty/fuzz/test/Android.bp trusty/gatekeeper/Android.bp trusty/gatekeeper/fuzz/Android.bp trusty/keymaster/Android.bp trusty/keymaster/fuzz/Android.bp trusty/libtrusty/Android.bp trusty/libtrusty/tipc-test/Android.bp trusty/secure_dpu/Android.bp trusty/storage/interface/Android.bp trusty/storage/lib/Android.bp trusty/storage/proxy/Android.bp trusty/storage/tests/Android.bp trusty/utils/spiproxyd/Android.bp trusty/utils/trusty-ut-ctrl/Android.bp usbd/Android.bp watchdogd/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to: debuggerd/Android.bp fastboot/Android.bp libkeyutils/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD SPDX-license-identifier-MIT to: libcutils/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT to: fs_mgr/Android.bp fs_mgr/libfs_avb/Android.bp trusty/Android.bp trusty/utils/rpmb_dev/Android.bp Added SPDX-license-identifier-BSD to: fastboot/fuzzy_fastboot/Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: Id740a7d2884556081fdb68876584b25eb95e1bef
* Revert "[LSC] Add LOCAL_LICENSE_KINDS to system/core"Elliott Hughes2021-02-161-9/+0
| | | | | | | | This reverts commit 187b7d19504ca8bdcbc6217c06a117017b4c6287. Reason for revert: system/core is multiple projects, not one. Change-Id: I790ea41741f8cd9b8b6db2f59a49e71fb0958fd6
* [LSC] Add LOCAL_LICENSE_KINDS to system/coreBob Badour2021-02-161-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added SPDX-license-identifier-Apache-2.0 to: bootstat/Android.bp cli-test/Android.bp code_coverage/Android.bp cpio/Android.bp debuggerd/crasher/Android.bp debuggerd/proto/Android.bp diagnose_usb/Android.bp fs_mgr/libdm/Android.bp fs_mgr/libfiemap/Android.bp fs_mgr/liblp/Android.bp fs_mgr/libsnapshot/Android.bp fs_mgr/libstorage_literals/Android.bp fs_mgr/libvbmeta/Android.bp fs_mgr/tests/Android.bp fs_mgr/tools/Android.bp gatekeeperd/Android.bp healthd/Android.bp healthd/testdata/Android.bp init/Android.bp init/Android.mk init/sysprop/Android.bp init/test_kill_services/Android.bp init/test_service/Android.bp libappfuse/Android.bp libasyncio/Android.bp libbinderwrapper/Android.bp libcrypto_utils/Android.bp libcrypto_utils/tests/Android.bp libdiskconfig/Android.bp libgrallocusage/Android.bp libkeyutils/mini_keyctl/Android.bp libmodprobe/Android.bp libnetutils/Android.bp libpackagelistparser/Android.bp libprocessgroup/Android.bp libprocessgroup/cgrouprc/Android.bp libprocessgroup/cgrouprc_format/Android.bp libprocessgroup/profiles/Android.bp libprocessgroup/setup/Android.bp libqtaguid/Android.bp libsparse/Android.bp libstats/push_compat/Android.bp libsuspend/Android.bp libsync/Android.bp libsystem/Android.bp libsysutils/Android.bp libusbhost/Android.bp libutils/Android.bp libvndksupport/Android.bp libvndksupport/tests/Android.bp llkd/Android.bp llkd/tests/Android.bp property_service/libpropertyinfoparser/Android.bp property_service/libpropertyinfoserializer/Android.bp property_service/property_info_checker/Android.bp qemu_pipe/Android.bp reboot/Android.bp rootdir/Android.bp rootdir/Android.mk rootdir/avb/Android.bp rootdir/avb/Android.mk run-as/Android.bp sdcard/Android.bp set-verity-state/Android.bp shell_and_utilities/Android.bp storaged/Android.bp toolbox/Android.bp trusty/apploader/Android.bp trusty/confirmationui/Android.bp trusty/confirmationui/fuzz/Android.bp trusty/coverage/Android.bp trusty/fuzz/Android.bp trusty/fuzz/test/Android.bp trusty/gatekeeper/Android.bp trusty/gatekeeper/fuzz/Android.bp trusty/keymaster/Android.bp trusty/keymaster/fuzz/Android.bp trusty/libtrusty/Android.bp trusty/libtrusty/tipc-test/Android.bp trusty/secure_dpu/Android.bp trusty/storage/interface/Android.bp trusty/storage/lib/Android.bp trusty/storage/proxy/Android.bp trusty/storage/tests/Android.bp trusty/utils/spiproxyd/Android.bp trusty/utils/trusty-ut-ctrl/Android.bp usbd/Android.bp watchdogd/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to: debuggerd/Android.bp fastboot/Android.bp libkeyutils/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD SPDX-license-identifier-MIT to: Android.bp libcutils/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT to: fs_mgr/Android.bp fs_mgr/libfs_avb/Android.bp trusty/utils/rpmb_dev/Android.bp Added SPDX-license-identifier-BSD to: fastboot/fuzzy_fastboot/Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: I5bd81adb5cdcf2b4dd4141b204eb430ff526af8f
* libprocessgroup: fix uid/pid hierarchy for recovery modeMarco Ballesio2021-02-111-0/+6
| | | | | | | | | configure the cgroup v2 hierarchy for recovery mode, and create uid/pid groups with attributes following the container cgroup directory. Bug: 168907513 Test: verified correct pid migration in normal and recovery modes Change-Id: Idc8b96b4db075383a6a2e523c241b0bc632c7030
* Revert^4 "libprocessgroup: uid/pid hierarchy for cgroup v2"Marco Ballesio2021-02-112-12/+0
| | | | | | | | | | This reverts commit 088924af2ad125f9135452223cdb8ecb90d9fb5a. Bug: 168907513 Test: verified correct function of the cgroup v2 hierarchy in normal and recovery mode Change-Id: I6e9d21ebe832326ed5a5b2c356fe8363c1546a80
* Revert^3 "libprocessgroup: move freezer to uid/pid hierarchy"Marco Ballesio2021-02-052-8/+8
| | | | | | | | This reverts commit 7707909ba26805d1c8453c2856a983a38ce26097. Bug: 179006802 Test: verified correct functioning of the freezer after reverting Change-Id: I848146a18a0879010abf5b00e7081f2771059064
* Merge "Revert^3 "libprocessgroup: uid/pid hierarchy for cgroup v2""Treehugger Robot2021-02-052-0/+12
|\
| * Revert^3 "libprocessgroup: uid/pid hierarchy for cgroup v2"Marco Ballesio2021-02-042-0/+12
| | | | | | | | | | | | | | | | | | | | a1a04979844173be24e6a239a1e0d6272cd20166 Bug: 151660495 Test: verified proper boot in regular mode and proper working of adb in recovery Change-Id: I1276796e982fee932cdea7eb145f20b3f1b3463d
* | Remove TEST_MAPPING entry based on go/a-unit-tests updateJulien Desprez2021-02-042-11/+0
| | | | | | | | | | | | | | | | cc_test_host now all run in presubmit without any need for explicit TEST_MAPPING Change-Id: I379ef754b4cb645976daedcd04eae58f2eb32a75 Test: presubmit Bug: 177450457
* | Revert "Revert "libprocessgroup: move freezer to uid/pid hierarchy""Marco Ballesio2021-01-272-8/+8
|/ | | | | | | | This reverts commit b01aa99408beec185fbece2e57523f66d47f0178. Reason for revert: blocking issue was resolved https://partner-android-review.googlesource.com/c/kernel/private/gs-google/+/1846507 Change-Id: If125fe9af53e2b519955f021208d5d5530c6277e
* Revert^2 "libprocessgroup: uid/pid hierarchy for cgroup v2"Marco Ballesio2021-01-272-12/+0
| | | | | | 4bbabe4ca42af39a21874c9cfb1f07d2a1de2856 Change-Id: I6742ffd19a6ea1fe3bf6b4386da69f5885b13be4
* Merge "Revert "libprocessgroup: move freezer to uid/pid hierarchy""Treehugger Robot2021-01-052-8/+8
|\
| * Revert "libprocessgroup: move freezer to uid/pid hierarchy"Marco Ballesio2021-01-052-8/+8
| | | | | | | | | | | | | | | | | | This reverts commit 1414a0d4d8b5254755184333d38118f1a2c16873. Reason for revert: reversions of CLs from http://b/174776875 removed dependencies for this CL, and made the freezer non-functional. This CL has to be reverted as well Bug:174776875 Change-Id: Idbd9532374bb661330b3c7546bbdf086a046aba3
* | Merge "Revert "libprocessgroup: uid/pid hierarchy for cgroup v2""Jonglin Lee2020-12-042-0/+12
|\ \ | |/ |/|
| * Revert "libprocessgroup: uid/pid hierarchy for cgroup v2"Jonglin Lee2020-12-042-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert "sepolicy: rules for uid/pid cgroups v2 hierarchy" Revert submission 1511692-cgroup v2 uid/pid hierarchy Reason for revert: Causing intermittent cgroup kernel panics Reverted Changes: I80c2a069b:sepolicy: rules for uid/pid cgroups v2 hierarchy I73f3e767d:libprocessgroup: uid/pid hierarchy for cgroup v2 Bug: 174776875 Change-Id: I2af586d63bb0312407b90b52909330cde4b7b074 Test: Locally reverted and booted 100 times without kernel panic
* | libprocessgroup: move freezer to uid/pid hierarchyMarco Ballesio2020-12-032-8/+8
| | | | | | | | | | | | | | | | | | | | | | Migrate the freezer controller as an attribute for the uid/pid hierarchy Bug: 168907513 Test: manually verified that the freezer behavior was as expected after applying the enablers in ActivityManager Signed-off-by: Marco Ballesio <balejs@google.com> Change-Id: Ica2c4bfd20190fb2f2dc0a530eb47e1a8427c522
* | libprocessgroup: Change per-API level task profiles to override the diffsSuren Baghdasaryan2020-12-036-1623/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current per-API level task profiles replace the latest task profiles rather than overriding the diffs. This poses an issue when a new feature is added which is applicable to older devices as well we have to change all per-API level profiles. Change the per-API task profile support to load the latest task profiles first and then override with per-API task profiles, similar to how vendor task profiles override system task profiles. This minimizes the changes we need to do to the per-API level task profiles going forward and is more consistent with how vendor task profiles work. Bug: 170507876 Test: boot with per-API task profiles Signed-off-by: Suren Baghdasaryan <surenb@google.com> Change-Id: I08cc4b374cede7363cf96a30ac96971d49bb7847
* | Merge changes I13c9660a,I41745e7b,I0e6722b8Wei Wang2020-12-031-0/+17
|\ \ | |/ |/| | | | | | | | | * changes: init.rc: correct the obsolete comment Add system-background cpu group init.rc: create camera-deamon stune cgroup
| * Add system-background cpu groupWei Wang2020-12-011-0/+17
| | | | | | | | | | | | | | | | | | | | Add system-background cgroup hierarchy for uclamp and cpu bandwidth tuning. Bug: 170507876 Bug: 171740453 Test: boot and check cgroup Change-Id: I41745e7b3ac5c1d7ea7dd77f5db39c6895047446
* | libprocessgroup: uid/pid hierarchy for cgroup v2Marco Ballesio2020-12-022-12/+0
|/ | | | | | | | | | | | | | Enable the uid/pid hierarchy for all groups when using cgroup v2. Mount the hierarchy under the cgroup v2 root. Make sure that all files under the hierarchy are accessible by the system user. Test: booted the device, tested the freezer cgroup, manually verified the working of the freezer from logs and by checking statuses of processes. Bug: 168907513 Test: Booted the device, verified no regressions on process group access Change-Id: I73f3e767d377902af6e12facb503b9136fb39e08
* libprocessgroup: Support per-API level task profilesSuren Baghdasaryan2020-11-237-0/+2104
| | | | | | | | | | | | | | | | | | | When task profiles changes happen, devices released under older API levels might have to use the same profiles as before. This might be due to for missing kernel features or some other reasons. Add support for per-API task profiles to accommodate this scenario. With this mechanism when ro.product.first_api_level is non-empty, the system looks for /system/etc/profiles/task_profiles_<api level>.json file and uses it if it exists. If ro.product.first_api_level is not defined or per-API task profiles file does not exist the system falls back to the default /system/etc/profiles/task_profiles.json file. As before, these task profiles can be competely overwritten using /vendor/etc/task_profiles.json if needed. Bug: 172066799 Test: boot with per-API task profiles Signed-off-by: Suren Baghdasaryan <surenb@google.com> Change-Id: I1671b341b3a0fb5e99d0b0788315c61088326b09
* task_profiles.json: use system subgroup for NormalPerformanceWei Wang2020-11-201-1/+1
| | | | | | | | | | Put tasks into a subgroup so that we can set things up e.g. soft cpu bandwidth and/or uclamp. Bug: 170507876 Bug: 171740453 Test: boot and check cgroup Change-Id: Iaeb081bc4f214aa23eb281e0c28a81ea581bb4d1
* libprocessgroup: Replace stune with utilclamp profilesSuren Baghdasaryan2020-10-292-25/+26
| | | | | | | | | | Replace schedtune out-of-tree controller's usage in the performance profiles with utilclamp controller. Stop mounting schedtune controller. Bug: 170507876 Test: cpuctl groups worked Signed-off-by: Suren Baghdasaryan <surenb@google.com> Change-Id: Ib7fa6c902581398587c75414845c2ff6c8bdb005
* Remove vts10 related configsDan Shi2020-10-062-34/+0
| | | | | | Bug: 169582597 Test: build Change-Id: I38e1e0f8e32b86ab14b905d040c1c62245a1a9e3
* libprocessgroup: json prototype for cgroups v2Marco Ballesio2020-08-201-2/+7
| | | | | | | | | cgroups v2 support introduces new fields in the json format. Adapt the proto file accordingly Bug: 154548692 Test: atest libprocessgroup_proto_test -- Change-Id: I40f8757a8f4e6a0b839caa7faa976dfebf3aac98
* libprocessgroup: switch freezer to cgroup v2Marco Ballesio2020-08-202-18/+20
| | | | | | | | | | | | remove cgroup v1 freezer entries from init.rc, add a new cgroup v2 controller and modify plists to properly interact with it. Bug: 154548692 Test: manually verified the the cgroup v1 freezer controller isn't created and a new controller for cgroup v2 is created under the correct sysfs directory. Change-Id: I1b811300ade486f88fdbd157255a7f37750cc54d
* freezer: allow dynamic changes to freezer.stateMarco Ballesio2020-08-191-0/+31
| | | | | | | | | | | create new profiles to allowing thawing and freezing back the freezer cgroup Bug: 151225245 Test: Manually verified that using the SetTaskProfiles method on the profiles thaws and freezes back the freezer cgroup. Change-Id: I7f3e193ebe79b49c1f6ac52b6138ff4ec26fc570
* vts_processgroup_validate_test: make deps staticYifan Hong2020-05-071-3/+3
| | | | | | Test: pass Fixes: 155959743 Change-Id: I730526955a40ae00a97f487e423a00c743f75d53
* task_profiles.json: add a new task profile used by camera HALSuren Baghdasaryan2020-05-011-0/+13
| | | | | | | | | Add new CameraServicePerformance task profile used by camera HAL. Bug: 155419956 Test: confirm profile applies correctly Signed-off-by: Suren Baghdasaryan <surenb@google.com> Change-Id: I21cf942eca279a5ad4c1ff75c735560954f4ebc1
* Add vts_processgroup_validate_test to vts suiteDan Shi2020-04-281-5/+4
| | | | | | | Bug: 154727600 Test: atest vts_processgroup_validate_test Change-Id: I53bd4f9fd097878deaa77159feb2d48f66c464d1 Merged-In: I53bd4f9fd097878deaa77159feb2d48f66c464d1
* Convert vts configs to Android.bpDan Willemsen2020-03-072-21/+4
| | | | | Test: treehugger Change-Id: Ibe8ed03555ac78ee38be6511eb4169cddfcd3555
* task_profiles.json: Fix uclamp attributeQuentin Perret2020-02-041-2/+2
| | | | | | | | | | | task_profiles.json currently uses attributes of a defunct version of uclamp, which was used for testing. Let's use the attributes that actually got merged upstream instead. Bug: 143710295 Change-Id: Ic6a14f52e14efeefc91f6e6bf580c15e2eded82e Signed-off-by: Quentin Perret <qperret@google.com>
* Add support for freezer cgroupMarco Ballesio2019-11-132-0/+33
| | | | | | | | | Adds the freezer cgroup to process groups Change-Id: Ib7a8dbe776ff156ff3827b9a659365384f3e6ac8 Bug: 143308662 Test: manual - frozen processes aren't scheduled for execution until unfrozen
* Fix build with new googletestHaibo Huang2019-11-101-3/+3
| | | | | | | The new googletest requires prefix to be non-empty. Exempt-From-Owner-Approval: fix test Change-Id: Ic039cb657b455919e429a3ec2107893b1734e8a1