summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorUsama Arif <usama.arif@linux.dev>2026-09-21 06:20:58 -0700
committerTejun Heo <tj@kernel.org>2026-09-21 06:58:37 -1000
commit3c6146e3327b2a2aa1b0ca070ac50c3142932c5e (patch)
treeef351562d089f717a58cb3d33736d5902cba65c0 /tools/perf/scripts/python
parent7dba07752511660ffc17dffa57b516259b3f4016 (diff)
downloadlinux-next-3c6146e3327b2a2aa1b0ca070ac50c3142932c5e.tar.gz
linux-next-3c6146e3327b2a2aa1b0ca070ac50c3142932c5e.zip
blk-cgroup: skip rstat flush for cgroups without blkgs
Non-root io.stat reads flush the blkcg rstat subtree before walking ->blkg_list. This takes the subsystem rstat lock and checks for pending updates on every possible CPU, even when there is no per-device state to print. Blkg creation is hierarchical. A descendant blkg implies an ancestor blkg on the same device, so an empty ->blkg_list means the subtree cannot contribute any output. Return early in that case. A concurrent first blkg may be deferred to the next read. This is consistent with the existing non-atomic flush and list walk. This is not rare: 340 of 969 io.stat files were empty on a 316-CPU host. In a 16-vCPU guest, the median open/read/close time over 35 batches of 20,000 reads changed as follows: before after empty io.stat 7.02 us 5.47 us populated io.stat 7.84 us 7.83 us This is a ~22% reduction for empty reads. Populated reads were unchanged. Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Usama Arif <usama.arif@linux.dev> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions