Merge changes Ia3aa8b3b,I6e8b80a8,I28552889
* changes:
libsnapshot: Support cluster_ops in make_cow_from_ab_ota
libsnapshot: Add silent option to inspect_cow
libsnapshot: Group CowOperations into clusters
diff --git a/init/builtins.cpp b/init/builtins.cpp
index b235d2f..c44e03e 100644
--- a/init/builtins.cpp
+++ b/init/builtins.cpp
@@ -1232,7 +1232,7 @@
}
static Result<void> GenerateLinkerConfiguration() {
- const char* linkerconfig_binary = "/system/bin/linkerconfig";
+ const char* linkerconfig_binary = "/apex/com.android.runtime/bin/linkerconfig";
const char* linkerconfig_target = "/linkerconfig";
const char* arguments[] = {linkerconfig_binary, "--target", linkerconfig_target};
diff --git a/libcutils/Android.bp b/libcutils/Android.bp
index 284c0b9..cf809f1 100644
--- a/libcutils/Android.bp
+++ b/libcutils/Android.bp
@@ -32,6 +32,7 @@
cc_library_headers {
name: "libcutils_headers",
vendor_available: true,
+ product_available: true,
recovery_available: true,
ramdisk_available: true,
vendor_ramdisk_available: true,
@@ -45,7 +46,10 @@
export_include_dirs: ["include"],
target: {
vendor: {
- override_export_include_dirs: ["include_vndk"],
+ override_export_include_dirs: ["include_outside_system"],
+ },
+ product: {
+ override_export_include_dirs: ["include_outside_system"],
},
linux_bionic: {
enabled: true,
@@ -60,6 +64,7 @@
cc_library {
name: "libcutils_sockets",
vendor_available: true,
+ product_available: true,
recovery_available: true,
ramdisk_available: true,
vendor_ramdisk_available: true,
@@ -143,6 +148,7 @@
cc_library {
name: "libcutils",
vendor_available: true,
+ product_available: true,
vndk: {
enabled: true,
support_system_process: true,
@@ -234,14 +240,19 @@
},
},
+ // qtaguid.cpp loads libnetd_client.so with dlopen(). Since
+ // the interface of libnetd_client.so may vary between AOSP
+ // releases, exclude qtaguid.cpp from the VNDK-SP variant.
vendor: {
exclude_srcs: [
- // qtaguid.cpp loads libnetd_client.so with dlopen(). Since
- // the interface of libnetd_client.so may vary between AOSP
- // releases, exclude qtaguid.cpp from the VNDK-SP variant.
"qtaguid.cpp",
],
- }
+ },
+ product: {
+ exclude_srcs: [
+ "qtaguid.cpp",
+ ],
+ },
},
whole_static_libs: ["libcutils_sockets"],
diff --git a/libcutils/include_vndk/cutils/android_filesystem_config.h b/libcutils/include_outside_system/cutils/android_filesystem_config.h
similarity index 100%
rename from libcutils/include_vndk/cutils/android_filesystem_config.h
rename to libcutils/include_outside_system/cutils/android_filesystem_config.h
diff --git a/libcutils/include_vndk/cutils/android_get_control_file.h b/libcutils/include_outside_system/cutils/android_get_control_file.h
similarity index 100%
rename from libcutils/include_vndk/cutils/android_get_control_file.h
rename to libcutils/include_outside_system/cutils/android_get_control_file.h
diff --git a/libcutils/include_vndk/cutils/android_reboot.h b/libcutils/include_outside_system/cutils/android_reboot.h
similarity index 100%
rename from libcutils/include_vndk/cutils/android_reboot.h
rename to libcutils/include_outside_system/cutils/android_reboot.h
diff --git a/libcutils/include_vndk/cutils/ashmem.h b/libcutils/include_outside_system/cutils/ashmem.h
similarity index 100%
rename from libcutils/include_vndk/cutils/ashmem.h
rename to libcutils/include_outside_system/cutils/ashmem.h
diff --git a/libcutils/include_vndk/cutils/atomic.h b/libcutils/include_outside_system/cutils/atomic.h
similarity index 100%
rename from libcutils/include_vndk/cutils/atomic.h
rename to libcutils/include_outside_system/cutils/atomic.h
diff --git a/libcutils/include_vndk/cutils/bitops.h b/libcutils/include_outside_system/cutils/bitops.h
similarity index 100%
rename from libcutils/include_vndk/cutils/bitops.h
rename to libcutils/include_outside_system/cutils/bitops.h
diff --git a/libcutils/include_vndk/cutils/compiler.h b/libcutils/include_outside_system/cutils/compiler.h
similarity index 100%
rename from libcutils/include_vndk/cutils/compiler.h
rename to libcutils/include_outside_system/cutils/compiler.h
diff --git a/libcutils/include_vndk/cutils/config_utils.h b/libcutils/include_outside_system/cutils/config_utils.h
similarity index 100%
rename from libcutils/include_vndk/cutils/config_utils.h
rename to libcutils/include_outside_system/cutils/config_utils.h
diff --git a/libcutils/include_vndk/cutils/fs.h b/libcutils/include_outside_system/cutils/fs.h
similarity index 100%
rename from libcutils/include_vndk/cutils/fs.h
rename to libcutils/include_outside_system/cutils/fs.h
diff --git a/libcutils/include_vndk/cutils/hashmap.h b/libcutils/include_outside_system/cutils/hashmap.h
similarity index 100%
rename from libcutils/include_vndk/cutils/hashmap.h
rename to libcutils/include_outside_system/cutils/hashmap.h
diff --git a/libcutils/include_vndk/cutils/iosched_policy.h b/libcutils/include_outside_system/cutils/iosched_policy.h
similarity index 100%
rename from libcutils/include_vndk/cutils/iosched_policy.h
rename to libcutils/include_outside_system/cutils/iosched_policy.h
diff --git a/libcutils/include_vndk/cutils/klog.h b/libcutils/include_outside_system/cutils/klog.h
similarity index 100%
rename from libcutils/include_vndk/cutils/klog.h
rename to libcutils/include_outside_system/cutils/klog.h
diff --git a/libcutils/include_vndk/cutils/list.h b/libcutils/include_outside_system/cutils/list.h
similarity index 100%
rename from libcutils/include_vndk/cutils/list.h
rename to libcutils/include_outside_system/cutils/list.h
diff --git a/libcutils/include_vndk/cutils/log.h b/libcutils/include_outside_system/cutils/log.h
similarity index 100%
rename from libcutils/include_vndk/cutils/log.h
rename to libcutils/include_outside_system/cutils/log.h
diff --git a/libcutils/include_vndk/cutils/memory.h b/libcutils/include_outside_system/cutils/memory.h
similarity index 100%
rename from libcutils/include_vndk/cutils/memory.h
rename to libcutils/include_outside_system/cutils/memory.h
diff --git a/libcutils/include_vndk/cutils/misc.h b/libcutils/include_outside_system/cutils/misc.h
similarity index 100%
rename from libcutils/include_vndk/cutils/misc.h
rename to libcutils/include_outside_system/cutils/misc.h
diff --git a/libcutils/include_vndk/cutils/multiuser.h b/libcutils/include_outside_system/cutils/multiuser.h
similarity index 100%
rename from libcutils/include_vndk/cutils/multiuser.h
rename to libcutils/include_outside_system/cutils/multiuser.h
diff --git a/libcutils/include_vndk/cutils/native_handle.h b/libcutils/include_outside_system/cutils/native_handle.h
similarity index 100%
rename from libcutils/include_vndk/cutils/native_handle.h
rename to libcutils/include_outside_system/cutils/native_handle.h
diff --git a/libcutils/include_vndk/cutils/partition_utils.h b/libcutils/include_outside_system/cutils/partition_utils.h
similarity index 100%
rename from libcutils/include_vndk/cutils/partition_utils.h
rename to libcutils/include_outside_system/cutils/partition_utils.h
diff --git a/libcutils/include_vndk/cutils/properties.h b/libcutils/include_outside_system/cutils/properties.h
similarity index 100%
rename from libcutils/include_vndk/cutils/properties.h
rename to libcutils/include_outside_system/cutils/properties.h
diff --git a/libcutils/include_vndk/cutils/qtaguid.h b/libcutils/include_outside_system/cutils/qtaguid.h
similarity index 100%
rename from libcutils/include_vndk/cutils/qtaguid.h
rename to libcutils/include_outside_system/cutils/qtaguid.h
diff --git a/libcutils/include_vndk/cutils/record_stream.h b/libcutils/include_outside_system/cutils/record_stream.h
similarity index 100%
rename from libcutils/include_vndk/cutils/record_stream.h
rename to libcutils/include_outside_system/cutils/record_stream.h
diff --git a/libcutils/include_vndk/cutils/sched_policy.h b/libcutils/include_outside_system/cutils/sched_policy.h
similarity index 100%
rename from libcutils/include_vndk/cutils/sched_policy.h
rename to libcutils/include_outside_system/cutils/sched_policy.h
diff --git a/libcutils/include_vndk/cutils/sockets.h b/libcutils/include_outside_system/cutils/sockets.h
similarity index 100%
rename from libcutils/include_vndk/cutils/sockets.h
rename to libcutils/include_outside_system/cutils/sockets.h
diff --git a/libcutils/include_vndk/cutils/str_parms.h b/libcutils/include_outside_system/cutils/str_parms.h
similarity index 100%
rename from libcutils/include_vndk/cutils/str_parms.h
rename to libcutils/include_outside_system/cutils/str_parms.h
diff --git a/libcutils/include_vndk/cutils/threads.h b/libcutils/include_outside_system/cutils/threads.h
similarity index 100%
rename from libcutils/include_vndk/cutils/threads.h
rename to libcutils/include_outside_system/cutils/threads.h
diff --git a/libcutils/include_vndk/cutils/trace.h b/libcutils/include_outside_system/cutils/trace.h
similarity index 100%
rename from libcutils/include_vndk/cutils/trace.h
rename to libcutils/include_outside_system/cutils/trace.h
diff --git a/libcutils/include_vndk/cutils/uevent.h b/libcutils/include_outside_system/cutils/uevent.h
similarity index 100%
rename from libcutils/include_vndk/cutils/uevent.h
rename to libcutils/include_outside_system/cutils/uevent.h
diff --git a/libprocessgroup/Android.bp b/libprocessgroup/Android.bp
index 71e2b91..f104100 100644
--- a/libprocessgroup/Android.bp
+++ b/libprocessgroup/Android.bp
@@ -1,6 +1,7 @@
cc_library_headers {
name: "libprocessgroup_headers",
vendor_available: true,
+ product_available: true,
ramdisk_available: true,
vendor_ramdisk_available: true,
recovery_available: true,
@@ -36,6 +37,7 @@
vendor_ramdisk_available: true,
recovery_available: true,
vendor_available: true,
+ product_available: true,
vndk: {
enabled: true,
support_system_process: true,
diff --git a/libprocessgroup/include/processgroup/sched_policy.h b/libprocessgroup/include/processgroup/sched_policy.h
index 945d90c..a18847e 100644
--- a/libprocessgroup/include/processgroup/sched_policy.h
+++ b/libprocessgroup/include/processgroup/sched_policy.h
@@ -42,7 +42,7 @@
SP_DEFAULT = -1,
SP_BACKGROUND = 0,
SP_FOREGROUND = 1,
- SP_SYSTEM = 2, // can't be used with set_sched_policy()
+ SP_SYSTEM = 2,
SP_AUDIO_APP = 3,
SP_AUDIO_SYS = 4,
SP_TOP_APP = 5,
diff --git a/libprocessgroup/profiles/cgroups.json b/libprocessgroup/profiles/cgroups.json
index 7bcb94b..962d2ba 100644
--- a/libprocessgroup/profiles/cgroups.json
+++ b/libprocessgroup/profiles/cgroups.json
@@ -37,7 +37,7 @@
"Controllers": [
{
"Controller": "freezer",
- "Path": "freezer",
+ "Path": ".",
"Mode": "0755",
"UID": "system",
"GID": "system"
diff --git a/libprocessgroup/profiles/cgroups_28.json b/libprocessgroup/profiles/cgroups_28.json
index 4518487..17d4929 100644
--- a/libprocessgroup/profiles/cgroups_28.json
+++ b/libprocessgroup/profiles/cgroups_28.json
@@ -1,59 +1,11 @@
{
"Cgroups": [
{
- "Controller": "blkio",
- "Path": "/dev/blkio",
- "Mode": "0755",
- "UID": "system",
- "GID": "system"
- },
- {
- "Controller": "cpu",
- "Path": "/dev/cpuctl",
- "Mode": "0755",
- "UID": "system",
- "GID": "system"
- },
- {
- "Controller": "cpuacct",
- "Path": "/acct",
- "Mode": "0555"
- },
- {
- "Controller": "cpuset",
- "Path": "/dev/cpuset",
- "Mode": "0755",
- "UID": "system",
- "GID": "system"
- },
- {
- "Controller": "memory",
- "Path": "/dev/memcg",
- "Mode": "0700",
- "UID": "root",
- "GID": "system"
- },
- {
"Controller": "schedtune",
"Path": "/dev/stune",
"Mode": "0755",
"UID": "system",
"GID": "system"
}
- ],
- "Cgroups2": {
- "Path": "/sys/fs/cgroup",
- "Mode": "0755",
- "UID": "system",
- "GID": "system",
- "Controllers": [
- {
- "Controller": "freezer",
- "Path": "freezer",
- "Mode": "0755",
- "UID": "system",
- "GID": "system"
- }
- ]
- }
+ ]
}
diff --git a/libprocessgroup/profiles/cgroups_29.json b/libprocessgroup/profiles/cgroups_29.json
index 4518487..17d4929 100644
--- a/libprocessgroup/profiles/cgroups_29.json
+++ b/libprocessgroup/profiles/cgroups_29.json
@@ -1,59 +1,11 @@
{
"Cgroups": [
{
- "Controller": "blkio",
- "Path": "/dev/blkio",
- "Mode": "0755",
- "UID": "system",
- "GID": "system"
- },
- {
- "Controller": "cpu",
- "Path": "/dev/cpuctl",
- "Mode": "0755",
- "UID": "system",
- "GID": "system"
- },
- {
- "Controller": "cpuacct",
- "Path": "/acct",
- "Mode": "0555"
- },
- {
- "Controller": "cpuset",
- "Path": "/dev/cpuset",
- "Mode": "0755",
- "UID": "system",
- "GID": "system"
- },
- {
- "Controller": "memory",
- "Path": "/dev/memcg",
- "Mode": "0700",
- "UID": "root",
- "GID": "system"
- },
- {
"Controller": "schedtune",
"Path": "/dev/stune",
"Mode": "0755",
"UID": "system",
"GID": "system"
}
- ],
- "Cgroups2": {
- "Path": "/sys/fs/cgroup",
- "Mode": "0755",
- "UID": "system",
- "GID": "system",
- "Controllers": [
- {
- "Controller": "freezer",
- "Path": "freezer",
- "Mode": "0755",
- "UID": "system",
- "GID": "system"
- }
- ]
- }
+ ]
}
diff --git a/libprocessgroup/profiles/cgroups_30.json b/libprocessgroup/profiles/cgroups_30.json
index 4518487..17d4929 100644
--- a/libprocessgroup/profiles/cgroups_30.json
+++ b/libprocessgroup/profiles/cgroups_30.json
@@ -1,59 +1,11 @@
{
"Cgroups": [
{
- "Controller": "blkio",
- "Path": "/dev/blkio",
- "Mode": "0755",
- "UID": "system",
- "GID": "system"
- },
- {
- "Controller": "cpu",
- "Path": "/dev/cpuctl",
- "Mode": "0755",
- "UID": "system",
- "GID": "system"
- },
- {
- "Controller": "cpuacct",
- "Path": "/acct",
- "Mode": "0555"
- },
- {
- "Controller": "cpuset",
- "Path": "/dev/cpuset",
- "Mode": "0755",
- "UID": "system",
- "GID": "system"
- },
- {
- "Controller": "memory",
- "Path": "/dev/memcg",
- "Mode": "0700",
- "UID": "root",
- "GID": "system"
- },
- {
"Controller": "schedtune",
"Path": "/dev/stune",
"Mode": "0755",
"UID": "system",
"GID": "system"
}
- ],
- "Cgroups2": {
- "Path": "/sys/fs/cgroup",
- "Mode": "0755",
- "UID": "system",
- "GID": "system",
- "Controllers": [
- {
- "Controller": "freezer",
- "Path": "freezer",
- "Mode": "0755",
- "UID": "system",
- "GID": "system"
- }
- ]
- }
+ ]
}
diff --git a/libprocessgroup/profiles/task_profiles.json b/libprocessgroup/profiles/task_profiles.json
index b528fa5..628098b 100644
--- a/libprocessgroup/profiles/task_profiles.json
+++ b/libprocessgroup/profiles/task_profiles.json
@@ -46,7 +46,7 @@
"File": "cpu.uclamp.latency_sensitive"
},
{
- "Name": "FreezerState",
+ "Name": "Freezer",
"Controller": "freezer",
"File": "cgroup.freeze"
}
@@ -70,11 +70,11 @@
"Name": "Frozen",
"Actions": [
{
- "Name": "JoinCgroup",
+ "Name": "SetAttribute",
"Params":
{
- "Controller": "freezer",
- "Path": ""
+ "Name": "Freezer",
+ "Value": "1"
}
}
]
@@ -83,11 +83,11 @@
"Name": "Unfrozen",
"Actions": [
{
- "Name": "JoinCgroup",
+ "Name": "SetAttribute",
"Params":
{
- "Controller": "freezer",
- "Path": "../"
+ "Name": "Freezer",
+ "Value": "0"
}
}
]
@@ -106,6 +106,19 @@
]
},
{
+ "Name": "ServicePerformance",
+ "Actions": [
+ {
+ "Name": "JoinCgroup",
+ "Params":
+ {
+ "Controller": "cpu",
+ "Path": "system-background"
+ }
+ }
+ ]
+ },
+ {
"Name": "HighPerformance",
"Actions": [
{
@@ -591,6 +604,10 @@
"Profiles": [ "MaxPerformance", "MaxIoPriority", "TimerSlackNormal" ]
},
{
+ "Name": "SCHED_SP_SYSTEM",
+ "Profiles": [ "ServicePerformance", "LowIoPriority", "TimerSlackNormal" ]
+ },
+ {
"Name": "SCHED_SP_RT_APP",
"Profiles": [ "RealtimePerformance", "MaxIoPriority", "TimerSlackNormal" ]
},
diff --git a/libprocessgroup/profiles/task_profiles_28.json b/libprocessgroup/profiles/task_profiles_28.json
index 142b0ba..9f83785 100644
--- a/libprocessgroup/profiles/task_profiles_28.json
+++ b/libprocessgroup/profiles/task_profiles_28.json
@@ -1,36 +1,6 @@
{
"Attributes": [
{
- "Name": "LowCapacityCPUs",
- "Controller": "cpuset",
- "File": "background/cpus"
- },
- {
- "Name": "HighCapacityCPUs",
- "Controller": "cpuset",
- "File": "foreground/cpus"
- },
- {
- "Name": "MaxCapacityCPUs",
- "Controller": "cpuset",
- "File": "top-app/cpus"
- },
- {
- "Name": "MemLimit",
- "Controller": "memory",
- "File": "memory.limit_in_bytes"
- },
- {
- "Name": "MemSoftLimit",
- "Controller": "memory",
- "File": "memory.soft_limit_in_bytes"
- },
- {
- "Name": "MemSwappiness",
- "Controller": "memory",
- "File": "memory.swappiness"
- },
- {
"Name": "STuneBoost",
"Controller": "schedtune",
"File": "schedtune.boost"
@@ -39,21 +9,6 @@
"Name": "STunePreferIdle",
"Controller": "schedtune",
"File": "schedtune.prefer_idle"
- },
- {
- "Name": "UClampMin",
- "Controller": "cpu",
- "File": "cpu.uclamp.min"
- },
- {
- "Name": "UClampMax",
- "Controller": "cpu",
- "File": "cpu.uclamp.max"
- },
- {
- "Name": "FreezerState",
- "Controller": "freezer",
- "File": "cgroup.freeze"
}
],
@@ -72,32 +27,6 @@
]
},
{
- "Name": "Frozen",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "freezer",
- "Path": ""
- }
- }
- ]
- },
- {
- "Name": "Unfrozen",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "freezer",
- "Path": "../"
- }
- }
- ]
- },
- {
"Name": "NormalPerformance",
"Actions": [
{
@@ -201,427 +130,6 @@
}
}
]
- },
-
- {
- "Name": "VrKernelCapacity",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": ""
- }
- }
- ]
- },
- {
- "Name": "VrServiceCapacityLow",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "system/background"
- }
- }
- ]
- },
- {
- "Name": "VrServiceCapacityNormal",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "system"
- }
- }
- ]
- },
- {
- "Name": "VrServiceCapacityHigh",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "system/performance"
- }
- }
- ]
- },
- {
- "Name": "VrProcessCapacityLow",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "application/background"
- }
- }
- ]
- },
- {
- "Name": "VrProcessCapacityNormal",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "application"
- }
- }
- ]
- },
- {
- "Name": "VrProcessCapacityHigh",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "application/performance"
- }
- }
- ]
- },
-
- {
- "Name": "ProcessCapacityLow",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "background"
- }
- }
- ]
- },
- {
- "Name": "ProcessCapacityNormal",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": ""
- }
- }
- ]
- },
- {
- "Name": "ProcessCapacityHigh",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "foreground"
- }
- }
- ]
- },
- {
- "Name": "ProcessCapacityMax",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "top-app"
- }
- }
- ]
- },
-
- {
- "Name": "ServiceCapacityLow",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "system-background"
- }
- }
- ]
- },
- {
- "Name": "ServiceCapacityRestricted",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "restricted"
- }
- }
- ]
- },
-
- {
- "Name": "CameraServiceCapacity",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "camera-daemon"
- }
- }
- ]
- },
-
- {
- "Name": "LowIoPriority",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "blkio",
- "Path": "background"
- }
- }
- ]
- },
- {
- "Name": "NormalIoPriority",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "blkio",
- "Path": ""
- }
- }
- ]
- },
- {
- "Name": "HighIoPriority",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "blkio",
- "Path": ""
- }
- }
- ]
- },
- {
- "Name": "MaxIoPriority",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "blkio",
- "Path": ""
- }
- }
- ]
- },
-
- {
- "Name": "TimerSlackHigh",
- "Actions": [
- {
- "Name": "SetTimerSlack",
- "Params":
- {
- "Slack": "40000000"
- }
- }
- ]
- },
- {
- "Name": "TimerSlackNormal",
- "Actions": [
- {
- "Name": "SetTimerSlack",
- "Params":
- {
- "Slack": "50000"
- }
- }
- ]
- },
-
- {
- "Name": "PerfBoost",
- "Actions": [
- {
- "Name": "SetClamps",
- "Params":
- {
- "Boost": "50%",
- "Clamp": "0"
- }
- }
- ]
- },
- {
- "Name": "PerfClamp",
- "Actions": [
- {
- "Name": "SetClamps",
- "Params":
- {
- "Boost": "0",
- "Clamp": "30%"
- }
- }
- ]
- },
-
- {
- "Name": "LowMemoryUsage",
- "Actions": [
- {
- "Name": "SetAttribute",
- "Params":
- {
- "Name": "MemSoftLimit",
- "Value": "16MB"
- }
- },
- {
- "Name": "SetAttribute",
- "Params":
- {
- "Name": "MemSwappiness",
- "Value": "150"
-
- }
- }
- ]
- },
- {
- "Name": "HighMemoryUsage",
- "Actions": [
- {
- "Name": "SetAttribute",
- "Params":
- {
- "Name": "MemSoftLimit",
- "Value": "512MB"
- }
- },
- {
- "Name": "SetAttribute",
- "Params":
- {
- "Name": "MemSwappiness",
- "Value": "100"
- }
- }
- ]
- },
- {
- "Name": "SystemMemoryProcess",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "memory",
- "Path": "system"
- }
- }
- ]
- },
- {
- "Name": "FreezerDisabled",
- "Actions": [
- {
- "Name": "SetAttribute",
- "Params":
- {
- "Name": "FreezerState",
- "Value": "0"
- }
- }
- ]
- },
- {
- "Name": "FreezerEnabled",
- "Actions": [
- {
- "Name": "SetAttribute",
- "Params":
- {
- "Name": "FreezerState",
- "Value": "1"
- }
- }
- ]
- }
- ],
-
- "AggregateProfiles": [
- {
- "Name": "SCHED_SP_DEFAULT",
- "Profiles": [ "TimerSlackNormal" ]
- },
- {
- "Name": "SCHED_SP_BACKGROUND",
- "Profiles": [ "HighEnergySaving", "LowIoPriority", "TimerSlackHigh" ]
- },
- {
- "Name": "SCHED_SP_FOREGROUND",
- "Profiles": [ "HighPerformance", "HighIoPriority", "TimerSlackNormal" ]
- },
- {
- "Name": "SCHED_SP_TOP_APP",
- "Profiles": [ "MaxPerformance", "MaxIoPriority", "TimerSlackNormal" ]
- },
- {
- "Name": "SCHED_SP_RT_APP",
- "Profiles": [ "RealtimePerformance", "MaxIoPriority", "TimerSlackNormal" ]
- },
- {
- "Name": "CPUSET_SP_DEFAULT",
- "Profiles": [ "TimerSlackNormal" ]
- },
- {
- "Name": "CPUSET_SP_BACKGROUND",
- "Profiles": [ "HighEnergySaving", "ProcessCapacityLow", "LowIoPriority", "TimerSlackHigh" ]
- },
- {
- "Name": "CPUSET_SP_FOREGROUND",
- "Profiles": [ "HighPerformance", "ProcessCapacityHigh", "HighIoPriority", "TimerSlackNormal" ]
- },
- {
- "Name": "CPUSET_SP_TOP_APP",
- "Profiles": [ "MaxPerformance", "ProcessCapacityMax", "MaxIoPriority", "TimerSlackNormal" ]
- },
- {
- "Name": "CPUSET_SP_SYSTEM",
- "Profiles": [ "ServiceCapacityLow", "TimerSlackNormal" ]
- },
- {
- "Name": "CPUSET_SP_RESTRICTED",
- "Profiles": [ "ServiceCapacityRestricted", "TimerSlackNormal" ]
}
]
}
diff --git a/libprocessgroup/profiles/task_profiles_29.json b/libprocessgroup/profiles/task_profiles_29.json
index 142b0ba..9f83785 100644
--- a/libprocessgroup/profiles/task_profiles_29.json
+++ b/libprocessgroup/profiles/task_profiles_29.json
@@ -1,36 +1,6 @@
{
"Attributes": [
{
- "Name": "LowCapacityCPUs",
- "Controller": "cpuset",
- "File": "background/cpus"
- },
- {
- "Name": "HighCapacityCPUs",
- "Controller": "cpuset",
- "File": "foreground/cpus"
- },
- {
- "Name": "MaxCapacityCPUs",
- "Controller": "cpuset",
- "File": "top-app/cpus"
- },
- {
- "Name": "MemLimit",
- "Controller": "memory",
- "File": "memory.limit_in_bytes"
- },
- {
- "Name": "MemSoftLimit",
- "Controller": "memory",
- "File": "memory.soft_limit_in_bytes"
- },
- {
- "Name": "MemSwappiness",
- "Controller": "memory",
- "File": "memory.swappiness"
- },
- {
"Name": "STuneBoost",
"Controller": "schedtune",
"File": "schedtune.boost"
@@ -39,21 +9,6 @@
"Name": "STunePreferIdle",
"Controller": "schedtune",
"File": "schedtune.prefer_idle"
- },
- {
- "Name": "UClampMin",
- "Controller": "cpu",
- "File": "cpu.uclamp.min"
- },
- {
- "Name": "UClampMax",
- "Controller": "cpu",
- "File": "cpu.uclamp.max"
- },
- {
- "Name": "FreezerState",
- "Controller": "freezer",
- "File": "cgroup.freeze"
}
],
@@ -72,32 +27,6 @@
]
},
{
- "Name": "Frozen",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "freezer",
- "Path": ""
- }
- }
- ]
- },
- {
- "Name": "Unfrozen",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "freezer",
- "Path": "../"
- }
- }
- ]
- },
- {
"Name": "NormalPerformance",
"Actions": [
{
@@ -201,427 +130,6 @@
}
}
]
- },
-
- {
- "Name": "VrKernelCapacity",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": ""
- }
- }
- ]
- },
- {
- "Name": "VrServiceCapacityLow",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "system/background"
- }
- }
- ]
- },
- {
- "Name": "VrServiceCapacityNormal",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "system"
- }
- }
- ]
- },
- {
- "Name": "VrServiceCapacityHigh",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "system/performance"
- }
- }
- ]
- },
- {
- "Name": "VrProcessCapacityLow",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "application/background"
- }
- }
- ]
- },
- {
- "Name": "VrProcessCapacityNormal",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "application"
- }
- }
- ]
- },
- {
- "Name": "VrProcessCapacityHigh",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "application/performance"
- }
- }
- ]
- },
-
- {
- "Name": "ProcessCapacityLow",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "background"
- }
- }
- ]
- },
- {
- "Name": "ProcessCapacityNormal",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": ""
- }
- }
- ]
- },
- {
- "Name": "ProcessCapacityHigh",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "foreground"
- }
- }
- ]
- },
- {
- "Name": "ProcessCapacityMax",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "top-app"
- }
- }
- ]
- },
-
- {
- "Name": "ServiceCapacityLow",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "system-background"
- }
- }
- ]
- },
- {
- "Name": "ServiceCapacityRestricted",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "restricted"
- }
- }
- ]
- },
-
- {
- "Name": "CameraServiceCapacity",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "camera-daemon"
- }
- }
- ]
- },
-
- {
- "Name": "LowIoPriority",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "blkio",
- "Path": "background"
- }
- }
- ]
- },
- {
- "Name": "NormalIoPriority",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "blkio",
- "Path": ""
- }
- }
- ]
- },
- {
- "Name": "HighIoPriority",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "blkio",
- "Path": ""
- }
- }
- ]
- },
- {
- "Name": "MaxIoPriority",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "blkio",
- "Path": ""
- }
- }
- ]
- },
-
- {
- "Name": "TimerSlackHigh",
- "Actions": [
- {
- "Name": "SetTimerSlack",
- "Params":
- {
- "Slack": "40000000"
- }
- }
- ]
- },
- {
- "Name": "TimerSlackNormal",
- "Actions": [
- {
- "Name": "SetTimerSlack",
- "Params":
- {
- "Slack": "50000"
- }
- }
- ]
- },
-
- {
- "Name": "PerfBoost",
- "Actions": [
- {
- "Name": "SetClamps",
- "Params":
- {
- "Boost": "50%",
- "Clamp": "0"
- }
- }
- ]
- },
- {
- "Name": "PerfClamp",
- "Actions": [
- {
- "Name": "SetClamps",
- "Params":
- {
- "Boost": "0",
- "Clamp": "30%"
- }
- }
- ]
- },
-
- {
- "Name": "LowMemoryUsage",
- "Actions": [
- {
- "Name": "SetAttribute",
- "Params":
- {
- "Name": "MemSoftLimit",
- "Value": "16MB"
- }
- },
- {
- "Name": "SetAttribute",
- "Params":
- {
- "Name": "MemSwappiness",
- "Value": "150"
-
- }
- }
- ]
- },
- {
- "Name": "HighMemoryUsage",
- "Actions": [
- {
- "Name": "SetAttribute",
- "Params":
- {
- "Name": "MemSoftLimit",
- "Value": "512MB"
- }
- },
- {
- "Name": "SetAttribute",
- "Params":
- {
- "Name": "MemSwappiness",
- "Value": "100"
- }
- }
- ]
- },
- {
- "Name": "SystemMemoryProcess",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "memory",
- "Path": "system"
- }
- }
- ]
- },
- {
- "Name": "FreezerDisabled",
- "Actions": [
- {
- "Name": "SetAttribute",
- "Params":
- {
- "Name": "FreezerState",
- "Value": "0"
- }
- }
- ]
- },
- {
- "Name": "FreezerEnabled",
- "Actions": [
- {
- "Name": "SetAttribute",
- "Params":
- {
- "Name": "FreezerState",
- "Value": "1"
- }
- }
- ]
- }
- ],
-
- "AggregateProfiles": [
- {
- "Name": "SCHED_SP_DEFAULT",
- "Profiles": [ "TimerSlackNormal" ]
- },
- {
- "Name": "SCHED_SP_BACKGROUND",
- "Profiles": [ "HighEnergySaving", "LowIoPriority", "TimerSlackHigh" ]
- },
- {
- "Name": "SCHED_SP_FOREGROUND",
- "Profiles": [ "HighPerformance", "HighIoPriority", "TimerSlackNormal" ]
- },
- {
- "Name": "SCHED_SP_TOP_APP",
- "Profiles": [ "MaxPerformance", "MaxIoPriority", "TimerSlackNormal" ]
- },
- {
- "Name": "SCHED_SP_RT_APP",
- "Profiles": [ "RealtimePerformance", "MaxIoPriority", "TimerSlackNormal" ]
- },
- {
- "Name": "CPUSET_SP_DEFAULT",
- "Profiles": [ "TimerSlackNormal" ]
- },
- {
- "Name": "CPUSET_SP_BACKGROUND",
- "Profiles": [ "HighEnergySaving", "ProcessCapacityLow", "LowIoPriority", "TimerSlackHigh" ]
- },
- {
- "Name": "CPUSET_SP_FOREGROUND",
- "Profiles": [ "HighPerformance", "ProcessCapacityHigh", "HighIoPriority", "TimerSlackNormal" ]
- },
- {
- "Name": "CPUSET_SP_TOP_APP",
- "Profiles": [ "MaxPerformance", "ProcessCapacityMax", "MaxIoPriority", "TimerSlackNormal" ]
- },
- {
- "Name": "CPUSET_SP_SYSTEM",
- "Profiles": [ "ServiceCapacityLow", "TimerSlackNormal" ]
- },
- {
- "Name": "CPUSET_SP_RESTRICTED",
- "Profiles": [ "ServiceCapacityRestricted", "TimerSlackNormal" ]
}
]
}
diff --git a/libprocessgroup/profiles/task_profiles_30.json b/libprocessgroup/profiles/task_profiles_30.json
index 142b0ba..9f83785 100644
--- a/libprocessgroup/profiles/task_profiles_30.json
+++ b/libprocessgroup/profiles/task_profiles_30.json
@@ -1,36 +1,6 @@
{
"Attributes": [
{
- "Name": "LowCapacityCPUs",
- "Controller": "cpuset",
- "File": "background/cpus"
- },
- {
- "Name": "HighCapacityCPUs",
- "Controller": "cpuset",
- "File": "foreground/cpus"
- },
- {
- "Name": "MaxCapacityCPUs",
- "Controller": "cpuset",
- "File": "top-app/cpus"
- },
- {
- "Name": "MemLimit",
- "Controller": "memory",
- "File": "memory.limit_in_bytes"
- },
- {
- "Name": "MemSoftLimit",
- "Controller": "memory",
- "File": "memory.soft_limit_in_bytes"
- },
- {
- "Name": "MemSwappiness",
- "Controller": "memory",
- "File": "memory.swappiness"
- },
- {
"Name": "STuneBoost",
"Controller": "schedtune",
"File": "schedtune.boost"
@@ -39,21 +9,6 @@
"Name": "STunePreferIdle",
"Controller": "schedtune",
"File": "schedtune.prefer_idle"
- },
- {
- "Name": "UClampMin",
- "Controller": "cpu",
- "File": "cpu.uclamp.min"
- },
- {
- "Name": "UClampMax",
- "Controller": "cpu",
- "File": "cpu.uclamp.max"
- },
- {
- "Name": "FreezerState",
- "Controller": "freezer",
- "File": "cgroup.freeze"
}
],
@@ -72,32 +27,6 @@
]
},
{
- "Name": "Frozen",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "freezer",
- "Path": ""
- }
- }
- ]
- },
- {
- "Name": "Unfrozen",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "freezer",
- "Path": "../"
- }
- }
- ]
- },
- {
"Name": "NormalPerformance",
"Actions": [
{
@@ -201,427 +130,6 @@
}
}
]
- },
-
- {
- "Name": "VrKernelCapacity",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": ""
- }
- }
- ]
- },
- {
- "Name": "VrServiceCapacityLow",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "system/background"
- }
- }
- ]
- },
- {
- "Name": "VrServiceCapacityNormal",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "system"
- }
- }
- ]
- },
- {
- "Name": "VrServiceCapacityHigh",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "system/performance"
- }
- }
- ]
- },
- {
- "Name": "VrProcessCapacityLow",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "application/background"
- }
- }
- ]
- },
- {
- "Name": "VrProcessCapacityNormal",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "application"
- }
- }
- ]
- },
- {
- "Name": "VrProcessCapacityHigh",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "application/performance"
- }
- }
- ]
- },
-
- {
- "Name": "ProcessCapacityLow",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "background"
- }
- }
- ]
- },
- {
- "Name": "ProcessCapacityNormal",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": ""
- }
- }
- ]
- },
- {
- "Name": "ProcessCapacityHigh",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "foreground"
- }
- }
- ]
- },
- {
- "Name": "ProcessCapacityMax",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "top-app"
- }
- }
- ]
- },
-
- {
- "Name": "ServiceCapacityLow",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "system-background"
- }
- }
- ]
- },
- {
- "Name": "ServiceCapacityRestricted",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "restricted"
- }
- }
- ]
- },
-
- {
- "Name": "CameraServiceCapacity",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "cpuset",
- "Path": "camera-daemon"
- }
- }
- ]
- },
-
- {
- "Name": "LowIoPriority",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "blkio",
- "Path": "background"
- }
- }
- ]
- },
- {
- "Name": "NormalIoPriority",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "blkio",
- "Path": ""
- }
- }
- ]
- },
- {
- "Name": "HighIoPriority",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "blkio",
- "Path": ""
- }
- }
- ]
- },
- {
- "Name": "MaxIoPriority",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "blkio",
- "Path": ""
- }
- }
- ]
- },
-
- {
- "Name": "TimerSlackHigh",
- "Actions": [
- {
- "Name": "SetTimerSlack",
- "Params":
- {
- "Slack": "40000000"
- }
- }
- ]
- },
- {
- "Name": "TimerSlackNormal",
- "Actions": [
- {
- "Name": "SetTimerSlack",
- "Params":
- {
- "Slack": "50000"
- }
- }
- ]
- },
-
- {
- "Name": "PerfBoost",
- "Actions": [
- {
- "Name": "SetClamps",
- "Params":
- {
- "Boost": "50%",
- "Clamp": "0"
- }
- }
- ]
- },
- {
- "Name": "PerfClamp",
- "Actions": [
- {
- "Name": "SetClamps",
- "Params":
- {
- "Boost": "0",
- "Clamp": "30%"
- }
- }
- ]
- },
-
- {
- "Name": "LowMemoryUsage",
- "Actions": [
- {
- "Name": "SetAttribute",
- "Params":
- {
- "Name": "MemSoftLimit",
- "Value": "16MB"
- }
- },
- {
- "Name": "SetAttribute",
- "Params":
- {
- "Name": "MemSwappiness",
- "Value": "150"
-
- }
- }
- ]
- },
- {
- "Name": "HighMemoryUsage",
- "Actions": [
- {
- "Name": "SetAttribute",
- "Params":
- {
- "Name": "MemSoftLimit",
- "Value": "512MB"
- }
- },
- {
- "Name": "SetAttribute",
- "Params":
- {
- "Name": "MemSwappiness",
- "Value": "100"
- }
- }
- ]
- },
- {
- "Name": "SystemMemoryProcess",
- "Actions": [
- {
- "Name": "JoinCgroup",
- "Params":
- {
- "Controller": "memory",
- "Path": "system"
- }
- }
- ]
- },
- {
- "Name": "FreezerDisabled",
- "Actions": [
- {
- "Name": "SetAttribute",
- "Params":
- {
- "Name": "FreezerState",
- "Value": "0"
- }
- }
- ]
- },
- {
- "Name": "FreezerEnabled",
- "Actions": [
- {
- "Name": "SetAttribute",
- "Params":
- {
- "Name": "FreezerState",
- "Value": "1"
- }
- }
- ]
- }
- ],
-
- "AggregateProfiles": [
- {
- "Name": "SCHED_SP_DEFAULT",
- "Profiles": [ "TimerSlackNormal" ]
- },
- {
- "Name": "SCHED_SP_BACKGROUND",
- "Profiles": [ "HighEnergySaving", "LowIoPriority", "TimerSlackHigh" ]
- },
- {
- "Name": "SCHED_SP_FOREGROUND",
- "Profiles": [ "HighPerformance", "HighIoPriority", "TimerSlackNormal" ]
- },
- {
- "Name": "SCHED_SP_TOP_APP",
- "Profiles": [ "MaxPerformance", "MaxIoPriority", "TimerSlackNormal" ]
- },
- {
- "Name": "SCHED_SP_RT_APP",
- "Profiles": [ "RealtimePerformance", "MaxIoPriority", "TimerSlackNormal" ]
- },
- {
- "Name": "CPUSET_SP_DEFAULT",
- "Profiles": [ "TimerSlackNormal" ]
- },
- {
- "Name": "CPUSET_SP_BACKGROUND",
- "Profiles": [ "HighEnergySaving", "ProcessCapacityLow", "LowIoPriority", "TimerSlackHigh" ]
- },
- {
- "Name": "CPUSET_SP_FOREGROUND",
- "Profiles": [ "HighPerformance", "ProcessCapacityHigh", "HighIoPriority", "TimerSlackNormal" ]
- },
- {
- "Name": "CPUSET_SP_TOP_APP",
- "Profiles": [ "MaxPerformance", "ProcessCapacityMax", "MaxIoPriority", "TimerSlackNormal" ]
- },
- {
- "Name": "CPUSET_SP_SYSTEM",
- "Profiles": [ "ServiceCapacityLow", "TimerSlackNormal" ]
- },
- {
- "Name": "CPUSET_SP_RESTRICTED",
- "Profiles": [ "ServiceCapacityRestricted", "TimerSlackNormal" ]
}
]
}
diff --git a/libprocessgroup/sched_policy.cpp b/libprocessgroup/sched_policy.cpp
index 698e74d..c51ee61 100644
--- a/libprocessgroup/sched_policy.cpp
+++ b/libprocessgroup/sched_policy.cpp
@@ -124,6 +124,8 @@
return SetTaskProfiles(tid, {"SCHED_SP_FOREGROUND"}, true) ? 0 : -1;
case SP_TOP_APP:
return SetTaskProfiles(tid, {"SCHED_SP_TOP_APP"}, true) ? 0 : -1;
+ case SP_SYSTEM:
+ return SetTaskProfiles(tid, {"SCHED_SP_SYSTEM"}, true) ? 0 : -1;
case SP_RT_APP:
return SetTaskProfiles(tid, {"SCHED_SP_RT_APP"}, true) ? 0 : -1;
default:
@@ -258,7 +260,7 @@
*/
static constexpr const char* kSchedProfiles[SP_CNT + 1] = {
"SCHED_SP_DEFAULT", "SCHED_SP_BACKGROUND", "SCHED_SP_FOREGROUND",
- "SCHED_SP_DEFAULT", "SCHED_SP_FOREGROUND", "SCHED_SP_FOREGROUND",
+ "SCHED_SP_SYSTEM", "SCHED_SP_FOREGROUND", "SCHED_SP_FOREGROUND",
"SCHED_SP_TOP_APP", "SCHED_SP_RT_APP", "SCHED_SP_DEFAULT"};
if (policy < SP_DEFAULT || policy >= SP_CNT) {
return nullptr;
diff --git a/libprocessgroup/setup/cgroup_map_write.cpp b/libprocessgroup/setup/cgroup_map_write.cpp
index a53132e..753fd2d 100644
--- a/libprocessgroup/setup/cgroup_map_write.cpp
+++ b/libprocessgroup/setup/cgroup_map_write.cpp
@@ -214,23 +214,23 @@
}
static bool ReadDescriptors(std::map<std::string, CgroupDescriptor>* descriptors) {
- unsigned int api_level = GetUintProperty<unsigned int>("ro.product.first_api_level", 0);
- std::string sys_cgroups_path = CGROUPS_DESC_FILE;
+ // load system cgroup descriptors
+ if (!ReadDescriptorsFromFile(CGROUPS_DESC_FILE, descriptors)) {
+ return false;
+ }
// load API-level specific system cgroups descriptors if available
+ unsigned int api_level = GetUintProperty<unsigned int>("ro.product.first_api_level", 0);
if (api_level > 0) {
std::string api_cgroups_path =
android::base::StringPrintf(TEMPLATE_CGROUPS_DESC_API_FILE, api_level);
if (!access(api_cgroups_path.c_str(), F_OK) || errno != ENOENT) {
- sys_cgroups_path = api_cgroups_path;
+ if (!ReadDescriptorsFromFile(api_cgroups_path, descriptors)) {
+ return false;
+ }
}
}
- // load system cgroup descriptors
- if (!ReadDescriptorsFromFile(sys_cgroups_path, descriptors)) {
- return false;
- }
-
// load vendor cgroup descriptors if the file exists
if (!access(CGROUPS_DESC_VENDOR_FILE, F_OK) &&
!ReadDescriptorsFromFile(CGROUPS_DESC_VENDOR_FILE, descriptors)) {
diff --git a/libprocessgroup/task_profiles.cpp b/libprocessgroup/task_profiles.cpp
index db44228..1311306 100644
--- a/libprocessgroup/task_profiles.cpp
+++ b/libprocessgroup/task_profiles.cpp
@@ -391,23 +391,24 @@
}
TaskProfiles::TaskProfiles() {
- unsigned int api_level = GetUintProperty<unsigned int>("ro.product.first_api_level", 0);
- std::string sys_profiles_path = TASK_PROFILE_DB_FILE;
+ // load system task profiles
+ if (!Load(CgroupMap::GetInstance(), TASK_PROFILE_DB_FILE)) {
+ LOG(ERROR) << "Loading " << TASK_PROFILE_DB_FILE << " for [" << getpid() << "] failed";
+ }
// load API-level specific system task profiles if available
+ unsigned int api_level = GetUintProperty<unsigned int>("ro.product.first_api_level", 0);
if (api_level > 0) {
std::string api_profiles_path =
android::base::StringPrintf(TEMPLATE_TASK_PROFILE_API_FILE, api_level);
if (!access(api_profiles_path.c_str(), F_OK) || errno != ENOENT) {
- sys_profiles_path = api_profiles_path;
+ if (!Load(CgroupMap::GetInstance(), api_profiles_path)) {
+ LOG(ERROR) << "Loading " << api_profiles_path << " for [" << getpid()
+ << "] failed";
+ }
}
}
- // load system task profiles
- if (!Load(CgroupMap::GetInstance(), sys_profiles_path)) {
- LOG(ERROR) << "Loading " << sys_profiles_path << " for [" << getpid() << "] failed";
- }
-
// load vendor task profiles if the file exists
if (!access(TASK_PROFILE_DB_VENDOR_FILE, F_OK) &&
!Load(CgroupMap::GetInstance(), TASK_PROFILE_DB_VENDOR_FILE)) {
diff --git a/libsystem/Android.bp b/libsystem/Android.bp
index 12c946c..b37b8ec 100644
--- a/libsystem/Android.bp
+++ b/libsystem/Android.bp
@@ -1,6 +1,7 @@
cc_library_headers {
name: "libsystem_headers",
vendor_available: true,
+ product_available: true,
recovery_available: true,
vendor_ramdisk_available: true,
host_supported: true,
diff --git a/libutils/Android.bp b/libutils/Android.bp
index 8ee16f3..1e7cbdb 100644
--- a/libutils/Android.bp
+++ b/libutils/Android.bp
@@ -15,6 +15,7 @@
cc_library_headers {
name: "libutils_headers",
vendor_available: true,
+ product_available: true,
recovery_available: true,
vendor_ramdisk_available: true,
host_supported: true,
@@ -62,6 +63,7 @@
cc_defaults {
name: "libutils_defaults",
vendor_available: true,
+ product_available: true,
recovery_available: true,
vndk: {
enabled: true,
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 42a12b7..2de066d 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -56,7 +56,7 @@
write /sys/module/dm_verity/parameters/prefetch_cluster 0
# Generate ld.config.txt for early executed processes
- exec -- /system/bin/linkerconfig --target /linkerconfig/bootstrap
+ exec -- /system/bin/bootstrap/linkerconfig --target /linkerconfig/bootstrap
chmod 644 /linkerconfig/bootstrap/ld.config.txt
copy /linkerconfig/bootstrap/ld.config.txt /linkerconfig/default/ld.config.txt
chmod 644 /linkerconfig/default/ld.config.txt
@@ -154,24 +154,28 @@
mkdir /dev/cpuctl/top-app
mkdir /dev/cpuctl/rt
mkdir /dev/cpuctl/system
+ mkdir /dev/cpuctl/system-background
chown system system /dev/cpuctl
chown system system /dev/cpuctl/foreground
chown system system /dev/cpuctl/background
chown system system /dev/cpuctl/top-app
chown system system /dev/cpuctl/rt
chown system system /dev/cpuctl/system
+ chown system system /dev/cpuctl/system-background
chown system system /dev/cpuctl/tasks
chown system system /dev/cpuctl/foreground/tasks
chown system system /dev/cpuctl/background/tasks
chown system system /dev/cpuctl/top-app/tasks
chown system system /dev/cpuctl/rt/tasks
chown system system /dev/cpuctl/system/tasks
+ chown system system /dev/cpuctl/system-background/tasks
chmod 0664 /dev/cpuctl/tasks
chmod 0664 /dev/cpuctl/foreground/tasks
chmod 0664 /dev/cpuctl/background/tasks
chmod 0664 /dev/cpuctl/top-app/tasks
chmod 0664 /dev/cpuctl/rt/tasks
chmod 0664 /dev/cpuctl/system/tasks
+ chmod 0664 /dev/cpuctl/system-background/tasks
# Create a cpu group for NNAPI HAL processes
mkdir /dev/cpuctl/nnapi-hal
@@ -196,7 +200,7 @@
# Surfaceflinger is in FG group so giving it a bit more
write /dev/cpuctl/foreground/cpu.rt_runtime_us 450000
write /dev/cpuctl/foreground/cpu.rt_period_us 1000000
- write /dev/cpuctl/background/cpu.rt_runtime_us 100000
+ write /dev/cpuctl/background/cpu.rt_runtime_us 50000
write /dev/cpuctl/background/cpu.rt_period_us 1000000
write /dev/cpuctl/top-app/cpu.rt_runtime_us 100000
write /dev/cpuctl/top-app/cpu.rt_period_us 1000000
@@ -204,12 +208,22 @@
write /dev/cpuctl/rt/cpu.rt_period_us 1000000
write /dev/cpuctl/system/cpu.rt_runtime_us 100000
write /dev/cpuctl/system/cpu.rt_period_us 1000000
- write /dev/cpuctl/nnapi-hal/cpu.rt_runtime_us 100000
+ write /dev/cpuctl/system-background/cpu.rt_runtime_us 50000
+ write /dev/cpuctl/system-background/cpu.rt_period_us 1000000
+ write /dev/cpuctl/nnapi-hal/cpu.rt_runtime_us 50000
write /dev/cpuctl/nnapi-hal/cpu.rt_period_us 1000000
+ write /dev/cpuctl/camera-daemon/cpu.rt_runtime_us 50000
+ write /dev/cpuctl/camera-daemon/cpu.rt_period_us 1000000
# Migrate root group to system subgroup
copy_per_line /dev/cpuctl/tasks /dev/cpuctl/system/tasks
+ # Create an stune group for camera-specific processes
+ mkdir /dev/stune/camera-daemon
+ chown system system /dev/stune/camera-daemon
+ chown system system /dev/stune/camera-daemon/tasks
+ chmod 0664 /dev/stune/camera-daemon/tasks
+
# Create an stune group for NNAPI HAL processes
mkdir /dev/stune/nnapi-hal
chown system system /dev/stune/nnapi-hal
@@ -341,7 +355,6 @@
# system-background is for system tasks that should only run on
# little cores, not on bigs
- # to be used only by init, so don't change system-bg permissions
mkdir /dev/cpuset/system-background
copy /dev/cpuset/cpus /dev/cpuset/system-background/cpus
copy /dev/cpuset/mems /dev/cpuset/system-background/mems