Skip to content

block: improve iops limit throttle

Ming Lei linux-block 4 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest8 patches 6 repliesApplied
  2. v38 patches 5 repliesSuperseded
  3. v27 patches 11 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v1 RFC7 patches6 repliesSuperseded

Changes in v4 from the cover letter

- remove wrapper in 4/8
- early return in 5/8

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/8block: move submit_bio_checks() into submit_bio_noacctblock/blk-core.c+3 -31 reply
2/8block: move blk_crypto_bio_prep() out of blk-mq.cblock/blk-core.c block/blk-mq.c+8 -161 reply
3/8block: don't declare submit_bio_checks in local headerblock/blk-core.c block/blk.h+1 -21 reply
4/8block: don't check bio in blk_throtl_dispatch_work_fnblock/blk-core.c block/blk-throttle.c block/blk.h+19 -141 reply
5/8block: merge submit_bio_checks() into submit_bio_noacctblock/blk-core.c+101 -1081 reply
6/8block: throttle split bio in case of iops limitblock/blk-merge.c block/blk-throttle.c block/blk-throttle.h+7 -70 replies
7/8block: don't try to throttle split bio if iops limit isn't setblock/blk-throttle.c block/blk-throttle.h+25 -70 replies
8/8block: revert 4f1e9630afe6 ("blk-throtl: optimize IOPS throttle for large IO scenarios")block/blk-throttle.c block/blk-throttle.h+0 -330 replies

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by.

PatchChristoph HellwigTejun HeoChaitanya Kulkarni
1/8R-b R-b
2/8R-b R-b
3/8R-b R-b
4/8R-b
5/8R-b R-b
6/8A-b
7/8A-b
8/8A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v4 thread

Cover letter [PATCH V4 0/8] block: improve iops limit throttle

Hello Guys,

Lining reported that iops limit throttle doesn't work on dm-thin, also iops limit throttle works bad on plain disk in case of excessive split.

Commit 4f1e9630afe6 ("blk-throtl: optimize IOPS throttle for large IO scenarios") was for addressing this issue, but the taken approach is just to run post-accounting, then current split bios won't be throttled actually, so actual iops throttle result isn't good in case of excessive bio splitting.

The 1st three patches are cleanup.

The 4th patches add one new local helper of submit_bio_noacct_nocheck() for blk_throtl_dispatch_work_fn(), so that bios won't be throttled any more when blk-throttle code dispatches throttled bios.

The 5th patch merges merge submit_bio_checks() into submit_bio_noacct as suggested by Christoph.

The 6th and 7th patch makes the real difference for throttling split bio wrt. iops limit.

The last patch is to revert commit 4f1e9630afe6 ("blk-throtl: optimize IOPS throttle for large IO scenarios").

Ning Li has verified that iops throttle is improved much on the posted RFC V1 version.

V4:
- remove wrapper in 4/8
- early return in 5/8

V3:
- add reviewed-by/acked-by tag
- patch style change 2/8
- mark submit_bio_checks as static 3/8
- move ubmit_bio_checks() into submit_bio_noacct 5/8

V2:
- remove RFC
- don't add/export __submit_bio_noacct(), instead add one new local helper of submit_bio_noacct_nocheck() per Christoph's suggestion

Ming Lei (8):
block: move submit_bio_checks() into submit_bio_noacct
block: move blk_crypto_bio_prep() out of blk-mq.c
block: don't declare submit_bio_checks in local header
block: don't check bio in blk_throtl_dispatch_work_fn
block: merge submit_bio_checks() into submit_bio_noacct
block: throttle split bio in case of iops limit
block: don't try to throttle split bio if iops limit isn't set
block: revert 4f1e9630afe6 ("blk-throtl: optimize IOPS throttle for
large IO scenarios")

 block/blk-core.c     | 248 +++++++++++++++++++++----------------------
 block/blk-merge.c    |   2 -
 block/blk-mq.c       |   3 -
 block/blk-throttle.c |  61 ++++-------
 block/blk-throttle.h |  16 +--
 block/blk.h          |   2 +-
 6 files changed, 153 insertions(+), 179 deletions(-)
Signature · 1 line
2.31.1