From: Zizhi Wo tg_flush_bios() calls tg_update_disptime() which inserts the tg into the parent_sq's pending_tree, but then schedules the pending timer on the tg's own sq. For leaf tg's with no children, the timer fires on an empty pending_tree and does nothing, leaving the bio stranded until the parent_sq's timer happens to fire naturally. This is masked in blk_throtl_cancel_bios() which walks all levels in post-order, but affects throtl_pd_offline() where a single leaf cgroup goes offline. Fix by scheduling the timer on the parent_sq where the tg was actually enqueued. Signed-off-by: Zizhi Wo --- 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 b82da0dfa8e8..93e9e0e352f0 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c @@ -1646,7 +1646,7 @@ static void tg_flush_bios(struct throtl_grp *tg) */ tg_update_disptime(tg); - throtl_schedule_pending_timer(sq, jiffies + 1); + throtl_schedule_pending_timer(sq->parent_sq, jiffies + 1); } static void throtl_pd_offline(struct blkg_policy_data *pd) -- 2.39.2