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. Signed-off-by: Tao Cui --- block/blk-throttle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-throttle.c b/block/blk-throttle.c index 2d39977ba9de..0ad30b688ce1 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c @@ -1652,7 +1652,7 @@ static void tg_flush_bios(struct throtl_grp *tg) */ tg_update_disptime(tg); - throtl_schedule_pending_timer(sq, jiffies + 1); + throtl_schedule_next_dispatch(sq->parent_sq, true); } static void throtl_pd_offline(struct blkg_policy_data *pd) -- 2.43.0