Skip to content

block: propagate in_flight to whole disk on partition I/O#866

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

block: propagate in_flight to whole disk on partition I/O#866
blktests-ci[bot] wants to merge 1 commit into
linus-master_basefrom
series/1099317=>linus-master

Conversation

@blktests-ci
Copy link
Copy Markdown

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

Pull request for series with
subject: block: propagate in_flight to whole disk on partition I/O
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1099317

@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented May 22, 2026

Upstream branch: 6779b50
series: https://patchwork.kernel.org/project/linux-block/list/?series=1099317
version: 1

@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented May 22, 2026

Upstream branch: 6779b50
series: https://patchwork.kernel.org/project/linux-block/list/?series=1099355
version: 2

@blktests-ci blktests-ci Bot added V2 and removed V1 labels May 22, 2026
@blktests-ci blktests-ci Bot force-pushed the series/1099317=>linus-master branch from 808011a to 4af20ad Compare May 22, 2026 13:06
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented May 22, 2026

Upstream branch: 6779b50
series: https://patchwork.kernel.org/project/linux-block/list/?series=1099393
version: 4

@blktests-ci blktests-ci Bot added V4 and removed V2 labels May 22, 2026
@blktests-ci blktests-ci Bot force-pushed the series/1099317=>linus-master branch from 4af20ad to 0cab926 Compare May 22, 2026 13:44
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented May 22, 2026

Upstream branch: 6779b50
series: https://patchwork.kernel.org/project/linux-block/list/?series=1099420
version: 5

@blktests-ci blktests-ci Bot added V5 and removed V4 labels May 22, 2026
@blktests-ci blktests-ci Bot force-pushed the series/1099317=>linus-master branch from 0cab926 to f533707 Compare May 22, 2026 14:55
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from ea833a1 to 7af85d1 Compare May 23, 2026 06:11
Now when I/O is submitted to a partition, the per-CPU in_flight[]
counter is incremented only on the partition's block_device, not on the
underlying whole disk. This leads to a problem which can be shown by a
fio test:

lsblk
  NAME     MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
  mydev    252:1    0   20G  0 disk
  └─mydev1 259:0    0   10G  0 part

iostat -xp 1
  Device       r/s        rkB/s      ... aqu-sz   %util
  mydev    128153.00  512612.00      ...  13.22   72.20
  mydev1   128154.00  512616.00      ...  13.22  100.00

%util is different between mydev and mydev1, which is unexpected.

This is the cumulative effect of a series of patches. The root cause is
commit e016b78 ("block: return just one value from part_in_flight"),
which deleted the branch in part_in_flight() that aggregated the whole-disk
in_flight count on top of the partition's. Then the second commit is
commit 10ec5e8 ("block: merge part_{inc,dev}_in_flight into their
only callers"), which folded the whole-disk in_flight accounting into
generic_start_io_acct() and generic_end_io_acct(). Those two helpers
were then removed by commit e722fff ("block: remove
generic_{start,end}_io_acct"), and from that point on the whole disk's
in_flight is no longer accounted at all.

In update_io_ticks(), if calling bdev_count_inflight() finds that the
inflight value of the whole device is 0, the accumulation of io_ticks will
be skipped, causing the reported util% value to be underestimated.

Fix it by restoring the whole-disk in_flight accounting.

Fixes: e016b78 ("block: return just one value from part_in_flight")
Suggested-by: Leon Hwang <leon.huangfu@shopee.com>
Signed-off-by: Tang Yizhou <yizhou.tang@shopee.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented May 23, 2026

Upstream branch: 79bd2dd
series: https://patchwork.kernel.org/project/linux-block/list/?series=1099420
version: 5

@blktests-ci blktests-ci Bot force-pushed the series/1099317=>linus-master branch from f533707 to a8be1de Compare May 23, 2026 06:12
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