Camera: create three new groups for camera threads am: 8d9f8f0ccc am: 04c20f72e9

Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101/+/15328126

Change-Id: I1221a4249ae41a2f2175b1f66a026c9460bd9219
This commit is contained in:
vincechiu 2021-07-23 09:36:27 +00:00 committed by Automerger Merge Worker
commit a27666dbd1
3 changed files with 171 additions and 0 deletions

View file

@ -149,6 +149,24 @@ on init
chown root root /dev/cpuctl/camera-daemon/cpu.uclamp.latency_sensitive chown root root /dev/cpuctl/camera-daemon/cpu.uclamp.latency_sensitive
chown system system /dev/cpuctl/camera-daemon/cgroup.procs chown system system /dev/cpuctl/camera-daemon/cgroup.procs
mkdir /dev/cpuset/camera-daemon-high-group
write /dev/cpuset/camera-daemon-high-group/cpus 0-7
write /dev/cpuset/camera-daemon-high-group/mems 0
chown system system /dev/cpuset/camera-daemon-high-group/tasks
chmod 0664 /dev/cpuset/camera-daemon-high-group/tasks
mkdir /dev/cpuset/camera-daemon-mid-group
write /dev/cpuset/camera-daemon-mid-group/cpus 0-7
write /dev/cpuset/camera-daemon-mid-group/mems 0
chown system system /dev/cpuset/camera-daemon-mid-group/tasks
chmod 0664 /dev/cpuset/camera-daemon-mid-group/tasks
mkdir /dev/cpuset/camera-daemon-mid-high-group
write /dev/cpuset/camera-daemon-mid-high-group/cpus 0-7
write /dev/cpuset/camera-daemon-mid-high-group/mems 0
chown system system /dev/cpuset/camera-daemon-mid-high-group/tasks
chmod 0664 /dev/cpuset/camera-daemon-mid-high-group/tasks
write /sys/kernel/vendor_sched/cam_prefer_idle 1 write /sys/kernel/vendor_sched/cam_prefer_idle 1
write /sys/kernel/vendor_sched/cam_uclamp_min 1 write /sys/kernel/vendor_sched/cam_uclamp_min 1

View file

@ -154,6 +154,42 @@
], ],
"ResetOnInit": true "ResetOnInit": true
}, },
{
"Name": "CDCpuset",
"Path": "/dev/cpuset/camera-daemon/cpus",
"Values": [
"4-7",
"0-7"
],
"ResetOnInit": true
},
{
"Name": "CDHighCpusetCpus",
"Path": "/dev/cpuset/camera-daemon-high-group/cpus",
"Values": [
"6-7",
"0-7"
],
"ResetOnInit": true
},
{
"Name": "CDMidCpusetCpus",
"Path": "/dev/cpuset/camera-daemon-mid-group/cpus",
"Values": [
"4-5",
"0-7"
],
"ResetOnInit": true
},
{
"Name": "CDMidHighCpusetCpus",
"Path": "/dev/cpuset/camera-daemon-mid-high-group/cpus",
"Values": [
"4-7",
"0-7"
],
"ResetOnInit": true
},
{ {
"Name": "F2fsRecessModeEnable", "Name": "F2fsRecessModeEnable",
"Path": "/dev/sys/fs/by-name/userdata/gc_urgent", "Path": "/dev/sys/fs/by-name/userdata/gc_urgent",
@ -420,6 +456,12 @@
"Duration": 1000, "Duration": 1000,
"Value": "9999999" "Value": "9999999"
}, },
{
"PowerHint": "CAMERA_LAUNCH",
"Node": "CDCpuset",
"Duration": 1000,
"Value": "4-7"
},
{ {
"PowerHint": "CAMERA_SHOT", "PowerHint": "CAMERA_SHOT",
"Node": "MemFreq", "Node": "MemFreq",
@ -624,6 +666,24 @@
"Duration": 0, "Duration": 0,
"Value": "0" "Value": "0"
}, },
{
"PowerHint": "CAMERA_STREAMING_EXTREME",
"Node": "CDHighCpusetCpus",
"Duration": 0,
"Value": "6-7"
},
{
"PowerHint": "CAMERA_STREAMING_EXTREME",
"Node": "CDMidCpusetCpus",
"Duration": 0,
"Value": "4-5"
},
{
"PowerHint": "CAMERA_STREAMING_EXTREME",
"Node": "CDMidHighCpusetCpus",
"Duration": 0,
"Value": "4-7"
},
{ {
"PowerHint": "CAMERA_STREAMING_HIGH", "PowerHint": "CAMERA_STREAMING_HIGH",
"Node": "CPUUtilThreshold", "Node": "CPUUtilThreshold",
@ -690,6 +750,24 @@
"Duration": 0, "Duration": 0,
"Value": "0" "Value": "0"
}, },
{
"PowerHint": "CAMERA_STREAMING_HIGH",
"Node": "CDHighCpusetCpus",
"Duration": 0,
"Value": "6-7"
},
{
"PowerHint": "CAMERA_STREAMING_HIGH",
"Node": "CDMidCpusetCpus",
"Duration": 0,
"Value": "4-5"
},
{
"PowerHint": "CAMERA_STREAMING_HIGH",
"Node": "CDMidHighCpusetCpus",
"Duration": 0,
"Value": "4-7"
},
{ {
"PowerHint": "CAMERA_STREAMING_STANDARD", "PowerHint": "CAMERA_STREAMING_STANDARD",
"Node": "CDPreferHighCap", "Node": "CDPreferHighCap",
@ -738,6 +816,24 @@
"Duration": 0, "Duration": 0,
"Value": "20 10 80" "Value": "20 10 80"
}, },
{
"PowerHint": "CAMERA_STREAMING_STANDARD",
"Node": "CDHighCpusetCpus",
"Duration": 0,
"Value": "6-7"
},
{
"PowerHint": "CAMERA_STREAMING_STANDARD",
"Node": "CDMidCpusetCpus",
"Duration": 0,
"Value": "4-5"
},
{
"PowerHint": "CAMERA_STREAMING_STANDARD",
"Node": "CDMidHighCpusetCpus",
"Duration": 0,
"Value": "4-7"
},
{ {
"PowerHint": "CAMERA_STREAMING_LOW", "PowerHint": "CAMERA_STREAMING_LOW",
"Node": "CDPreferHighCap", "Node": "CDPreferHighCap",
@ -792,6 +888,24 @@
"Duration": 0, "Duration": 0,
"Value": "20 10 80" "Value": "20 10 80"
}, },
{
"PowerHint": "CAMERA_STREAMING_LOW",
"Node": "CDHighCpusetCpus",
"Duration": 0,
"Value": "6-7"
},
{
"PowerHint": "CAMERA_STREAMING_LOW",
"Node": "CDMidCpusetCpus",
"Duration": 0,
"Value": "4-5"
},
{
"PowerHint": "CAMERA_STREAMING_LOW",
"Node": "CDMidHighCpusetCpus",
"Duration": 0,
"Value": "4-7"
},
{ {
"PowerHint": "FIXED_PERFORMANCE", "PowerHint": "FIXED_PERFORMANCE",
"Node": "CPUBigClusterMaxFreq", "Node": "CPUBigClusterMaxFreq",

View file

@ -44,6 +44,45 @@
} }
] ]
}, },
{
"Name": "CameraServiceHighCapacity",
"Actions": [
{
"Name": "JoinCgroup",
"Params":
{
"Controller": "cpuset",
"Path": "camera-daemon-high-group"
}
}
]
},
{
"Name": "CameraServiceMidCapacity",
"Actions": [
{
"Name": "JoinCgroup",
"Params":
{
"Controller": "cpuset",
"Path": "camera-daemon-mid-group"
}
}
]
},
{
"Name": "CameraServiceMidHighCapacity",
"Actions": [
{
"Name": "JoinCgroup",
"Params":
{
"Controller": "cpuset",
"Path": "camera-daemon-mid-high-group"
}
}
]
},
{ {
"Name": "HighEnergySaving", "Name": "HighEnergySaving",
"Actions": [ "Actions": [