Skip to content

Commit 5e65a20

Browse files
josefbacikaxboe
authored andcommitted
blk-wbt: wake up all when we scale up, not down
Tetsuo brought to my attention that I screwed up the scale_up/scale_down helpers when I factored out the rq-qos code. We need to wake up all the waiters when we add slots for requests to make, not when we shrink the slots. Otherwise we'll end up things waiting forever. This was a mistake and simply puts everything back the way it was. cc: stable@vger.kernel.org Fixes: a790504 ("blk-rq-qos: refactor out common elements of blk-wbt") eported-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 133424a commit 5e65a20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

block/blk-wbt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ static void scale_up(struct rq_wb *rwb)
310310
rq_depth_scale_up(&rwb->rq_depth);
311311
calc_wb_limits(rwb);
312312
rwb->unknown_cnt = 0;
313+
rwb_wake_all(rwb);
313314
rwb_trace_step(rwb, "scale up");
314315
}
315316

@@ -318,7 +319,6 @@ static void scale_down(struct rq_wb *rwb, bool hard_throttle)
318319
rq_depth_scale_down(&rwb->rq_depth, hard_throttle);
319320
calc_wb_limits(rwb);
320321
rwb->unknown_cnt = 0;
321-
rwb_wake_all(rwb);
322322
rwb_trace_step(rwb, "scale down");
323323
}
324324

0 commit comments

Comments
 (0)