Skip to content

blk-throttle: schedule parent dispatch in tg_flush_bios()#857

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

blk-throttle: schedule parent dispatch in tg_flush_bios()#857
blktests-ci[bot] wants to merge 1 commit into
linus-master_basefrom
series/1097754=>linus-master

Conversation

@blktests-ci
Copy link
Copy Markdown

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

Pull request for series with
subject: blk-throttle: schedule parent dispatch in tg_flush_bios()
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1097754

@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented May 20, 2026

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

@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented May 21, 2026

Upstream branch: 8bc67e4
series: https://patchwork.kernel.org/project/linux-block/list/?series=1097754
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1097754=>linus-master branch from 3215068 to 289b9cd Compare May 21, 2026 02:59
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from c1feb59 to ea833a1 Compare May 22, 2026 01:53
@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=1097754
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1097754=>linus-master branch from 289b9cd to 83fcc4b Compare May 22, 2026 01:59
@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=1099235
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/1097754=>linus-master branch from 83fcc4b to 99e9641 Compare May 22, 2026 09:46
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from ea833a1 to 7af85d1 Compare May 23, 2026 06:11
tg_flush_bios() schedules pending_timer on the child tg's own
service_queue, which causes throtl_pending_timer_fn() to dispatch from
the child's pending_tree.  For leaf cgroups this tree is empty, so the
timer fires and exits without dispatching the throttled bio.

The throttled bio sits in the parent's pending_tree with disptime set
to jiffies (THROTL_TG_CANCELING zeroes all dispatch times), but the
parent's timer is never explicitly rescheduled.  The bio only gets
dispatched when the parent timer eventually fires at its previously
scheduled expiry.

Fix by calling throtl_schedule_next_dispatch(sq->parent_sq, true)
instead, matching what tg_set_limit() already does.  This forces the
parent's dispatch cycle to run immediately and flush all canceling
bios without waiting for a stale timer.

For the device deletion path (blk_throtl_cancel_bios), directly
complete throttled bios with EIO via bio_io_error() instead of
dispatching them through the timer -> work -> submission chain.
This avoids a race with the SCSI state machine where bios can reach
the SCSI layer while the device is in SDEV_CANCEL state, causing
ENODEV instead of the expected EIO.

Reported-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Link: https://lore.kernel.org/all/ag2owaQQoigp_fSV@shinmob/
Signed-off-by: Tao Cui <cuitao@kylinos.cn>
@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=1099235
version: 2

@blktests-ci blktests-ci Bot force-pushed the series/1097754=>linus-master branch from 99e9641 to 69dd8a7 Compare May 23, 2026 06:17
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