Age | Commit message (Collapse) | Author |
|
Compaction duration metrics:
(/sys/kernel/pixel_stat/mm/compaction/mm_compaction_duration)
Sample output:
(root) # cat /sys/kernel/pixel_stat/mm/compaction/mm_compaction_duration
2 480 0 0 0 2 0
Test: local test
Bug: 234564667
Signed-off-by: Robin Hsu <robinhsu@google.com>
Change-Id: Ie5329acf0b312f9245c882738b210a8a231b5899
|
|
Direct reclaim metrics:
/sys/kernel/pixel_stat/mm/vmscan/direct_reclaim/<level>/latency_stat
<level> could be native, top, visible, or other
Sample output:
(root) # cat /sys/kernel/pixel_stat/mm/vmscan/direct_reclaim/native/latency_stat
138 7888 70 35 31 2
Test: local test
Bug: 234564667
Signed-off-by: Robin Hsu <robinhsu@google.com>
Change-Id: If695ae5016037b6bd1e213981340f2b14bf756f2
|
|
Add shared functions for reading direct reclaim and compaction duration
information. The format is a number of integers.
e.g.
/sys/kernel/pixel_stat/mm/vmscan/direct_reclaim/visible/latency_stat:
0 0 0 0 0 0
Test: local test
Bug: 234564667
Signed-off-by: Robin Hsu <robinhsu@google.com>
Change-Id: If09cf4b6538be0bcbb99a9e90a81784a9c406bc9
|
|
We previous employed some vmstat metrics (proc/vmstat). This time
we add even more:
* Added metrics list
"workingset_refault_file"
"workingset_refault_anon"
"compact_success"
"compact_fail"
"kswapd_low_wmark_hit_quickly"
"kswapd_high_wmark_hit_quickly"
"thp_file_alloc"
"thp_zero_page_alloc"
"thp_split_page"
"thp_migration_split"
"thp_deferred_split_page"
* Note: previous implementation mixed "workingset_refault" and
"workingset_refault_file". As old kernel only has
"workingset_refault", newer kernel has separated
'workingset_refault_file", and "workingset_refault_anon"
This CL define it more clearly, where old metrics are left there
for backward compatibility, and added two more metrics for '_file'
and '_anon'.
Test: local test
Bug: 234564667
Signed-off-by: Robin Hsu <robinhsu@google.com>
Change-Id: I812386bec4db3d982a82731f82bc61af9c53b9e5
|
|
PSI metrics: (proc/pressure/<xyz>, xyz = cpu, io, or memory)
sample output:
/proc/pressure # cat cpu
some avg10=2.93 avg60=3.17 avg300=3.15 total=94628150260
/proc/pressure # cat io
some avg10=1.06 avg60=1.15 avg300=1.18 total=37709873805
full avg10=1.06 avg60=1.10 avg300=1.11 total=36592322936
/proc/pressure # cat memory
some avg10=0.00 avg60=0.00 avg300=0.00 total=29705314
full avg10=0.00 avg60=0.00 avg300=0.00 total=17234456
avg<n>: <n> = 10, 60, 300 means <n> second moving average stall %
2-decimal digits accuracy. Used fixed-point with 2-decimal digit
e.g. 16.66% => 1666
We sample the avg<n> metrics per 5 minutes and aggregate min, max and avg
for avg<n>
total: total stall (not in percentage)
'total' metrics will not be aggregated. They will be shown as
per hour difference (current value - previous value).
Test: local test
Bug: 234564667
Signed-off-by: Robin Hsu <robinhsu@google.com>
Change-Id: Ia074aac8a49ad1315195935322f143416a56f413
|
|
Some small change in the MM metrics framework:
* Previously preparing atom by a vector "values", and the vector is
keep resized per module added in. This CL calculates the last index
and allocate space for the vector once for all. Note that
later on, if we want to add or remove some metrics, we need to change
the last index to keep it sync to the last metric proto file.
* Add version for 'PixelMmMetricsPerHour' and 'PixelMmMetricsPerday'
(and it is the last metrics as defined in the design doc)
Test: n/a
Bug: 234564667
Signed-off-by: Robin Hsu <robinhsu@google.com>
Change-Id: I35da187f9318e8aed089c3676d8c6df815913f02
|
|
For atom 'PixelMmMetricsPerHour', previously we skip the first round
metrics reports. The intention was to skip those heavy boot-time metrics
so that it won't affect our statistics on normal data.
However, in newer implementation, we already have the
elapsed_timetsamp_nanos field (event time in "devices time since boot"
format) in the Suez table (b/223529199). Now it's even better:
We can use the device time to filter out those boot events, and we
can separate the statistics into two categories: (1) normal, and
(2) boot time.
So this time we don't skip the first round report.
Test: n/a
Bug: 234564667
Signed-off-by: Robin Hsu <robinhsu@google.com>
Change-Id: I05705e4b16b6e790b54b17a149179b6ea24f2fdf
|
|
Bug: 224697964
Test: TH
Change-Id: I566e23bc818a6d7184202d445eba438f41b5cf5b
|
|
* add check kernel mm metrics support (no metric collection if not
supported.)
* BTW: fix getting user-bulid property to run once (in the constructor) rather
than getting property everytime
Bug: 196106780
Test: through debug prints
Signed-off-by: Robin Hsu <robinhsu@google.com>
Change-Id: I2d241159433c514212f6d7f6e4a1b711b38e2d2b
|
|
Since CMA heap names can be changed during the project development,
we would like to store the CMA heap name directly instead of the
enum value in order to avoid the maintenance effort.
Bug: 194049685
Bug: 194077502
Test: adb shell cmd stats print-stats | grep 10502[45]
Test: adb shell cmd stats print-logs
adb logcat | grep 10502[45]
Change-Id: Icfa9ffb45c6b14bdfb2c0364c55fe3e94056aa31
|
|
sc-dev
|
|
The root sysfs of CMA heap statistics should be changed
from <kPixelStatMm> to <kPixelStatMm>/cma
Bug: 173101018
Test: adb shell cmd stats print-stats | grep 10502[45]
Test: adb shell cmd stats print-logs
adb logcat | grep 10502[45]
Signed-off-by: Chiawei Wang <chiaweiwang@google.com>
Change-Id: I62a61f0165947073ec2ab7f077658ca125f159df
|
|
1. Change CMA heap sysfs from <kPixelStatMm> to <kPixelStatMm>/cma
There are several <cma-heap> under this sysfs
2. Add/replace CMA heaps
3. Change the file node names under each <cma-heap>
Bug: 173101018
Test: adb shell cmd stats print-stats | grep 10502[45]
Test: adb shell cmd stats print-logs
adb logcat | grep 10502[45]
Signed-off-by: Chiawei Wang <chiaweiwang@google.com>
Change-Id: I9e36da0799f5421307e363a281e68d989073e481
|
|
Since Debugfs is only invoked by dumpstate, we change
to collect the GPU total pages from the new sysfs provided by
the GPU driver.
Bug: 173101018
Test: adb shell cmd stats print-stats | grep 105015
Test: adb shell cmd stats print-logs
adb logcat | grep 105015
Signed-off-by: Chiawei Wang <chiaweiwang@google.com>
Change-Id: Iae5ef0f341143d24e69a97341eec95ae9361f6d0
|
|
|
|
According to fs/proc/array.c in kernel, the unit of stime
in /proc/<pid>/stat should be clocks.
Bug: 173101018
Test: adb shell cmd stats print-stats | grep 105016
Test: adb shell cmd stats print-logs
adb logcat | grep 105016
Change-Id: I15c73d80106e2d815a5582541b27264dc19ba7bf
|
|
Bug: 184885739
Test: TH
Change-Id: Ie79231ece35e1779943194a09f89dc421bffc742
|
|
Upload the metrics from the following file nodes:
[stime of kswapd and kcompactd]
/proc/<kswapd0 pid>/stat:
stime
/proc/<kcompactd0 pid>/stat:
stime
[Pixel specifc metrics]
/sys/kernel/pixel_stat/mm/vmstat:
pgalloc_costly_order
pgcache_miss
pgcache_hit
[CMA metrics]
/sys/kernel/pixel_stat/mm/<cma-heap type>:
cma_alloc_pages_attempts
cma_alloc_pages_soft_attempts
cma_fail_pages
cma_fail_soft_pages
migrated_pages
cma_alloc_latency_low
cma_alloc_latency_mid
cma_alloc_latency_high
cma-heap type:
farawimg
faimg
fatpu
faprev
vframe
[GPU allocated pages]
/sys/kernel/debug/physical-memory-group-manager/<group>:
size
lp_size
Bug: 173101018
Test: adb shell cmd stats print-stats | grep 10501[56]
Test: adb shell cmd stats print-stats | grep 10502[45]
Test: adb shell cmd stats print-logs
adb logcat | grep -e 10501[56] -e 10502[45]
Signed-off-by: Chiawei Wang <chiaweiwang@google.com>
Change-Id: Ie10a8f606b12988043d131ee545556af3fd55b74
|
|
Create MmMetricsReporter to report MM Metrics atoms
Bug: 173101018
Test: adb shell cmd stats print-stats | grep 10501[56]
Test: adb shell cmd stats print-logs
adb logcat | grep 10501[56]
Change-Id: I5f64fb680cb093325bc241894f3b240e9c41d40c
|