Skip to content

blk-cgroup-rwstat: add missing DISCARD counter in blkg_rwstat_total()#838

Open
blktests-ci[bot] wants to merge 1 commit into
linus-master_basefrom
series/1095754=>linus-master
Open

blk-cgroup-rwstat: add missing DISCARD counter in blkg_rwstat_total()#838
blktests-ci[bot] wants to merge 1 commit into
linus-master_basefrom
series/1095754=>linus-master

Conversation

@blktests-ci
Copy link
Copy Markdown

@blktests-ci blktests-ci Bot commented May 16, 2026

Pull request for series with
subject: blk-cgroup-rwstat: add missing DISCARD counter in blkg_rwstat_total()
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1095754

Since commit 636620b ("blkcg: Track DISCARD statistics and output
them in cgroup io.stat"), blkg_rwstat_add() routes discard IOs into
BLKG_RWSTAT_DISCARD, but blkg_rwstat_total() still only sums READ and
WRITE.  This makes the total inconsistent with the per-type counters
whenever discard IOs are present.

On mixed read/write/discard workloads, the total undercounts the
actual IO activity.  If only discard requests are queued, the total
returns 0 outright.  In BFQ this causes avg_queue_size to be
underestimated and the group to be incorrectly marked empty.

The affected BFQ code paths are all gated by CONFIG_BFQ_CGROUP_DEBUG
and used only for statistics display (bfq.sectors, bfq.avg_queue_size,
bfq.empty_time).  No scheduling decisions depend on these values.

Signed-off-by: Tao Cui <cuitao@kylinos.cn>
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented May 16, 2026

Upstream branch: 70eda68
series: https://patchwork.kernel.org/project/linux-block/list/?series=1095754
version: 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants