* [PATCH] blk-wbt: wake up all when we scale up, not down
@ 2018-10-11 19:29 Josef Bacik
2018-10-11 19:31 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Josef Bacik @ 2018-10-11 19:29 UTC (permalink / raw)
To: axboe, linux-block, kernel-team; +Cc: stable
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: a79050434b45 ("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>
---
JENS! I did this on for-4.20/block FYI
block/blk-wbt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-wbt.c b/block/blk-wbt.c
index 8e20a0677dcf..8ac93fcbaa2e 100644
--- a/block/blk-wbt.c
+++ b/block/blk-wbt.c
@@ -310,6 +310,7 @@ static void scale_up(struct rq_wb *rwb)
rq_depth_scale_up(&rwb->rq_depth);
calc_wb_limits(rwb);
rwb->unknown_cnt = 0;
+ rwb_wake_all(rwb);
rwb_trace_step(rwb, "scale up");
}
@@ -318,7 +319,6 @@ static void scale_down(struct rq_wb *rwb, bool hard_throttle)
rq_depth_scale_down(&rwb->rq_depth, hard_throttle);
calc_wb_limits(rwb);
rwb->unknown_cnt = 0;
- rwb_wake_all(rwb);
rwb_trace_step(rwb, "scale down");
}
--
2.14.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] blk-wbt: wake up all when we scale up, not down
2018-10-11 19:29 [PATCH] blk-wbt: wake up all when we scale up, not down Josef Bacik
@ 2018-10-11 19:31 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2018-10-11 19:31 UTC (permalink / raw)
To: Josef Bacik, linux-block, kernel-team; +Cc: stable
On 10/11/18 1:29 PM, Josef Bacik wrote:
> 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.
I'll apply this for 4.19. I haven't hit this in testing, I'm guessing
the jitter when going up and down hides the issue.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-12 2:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-11 19:29 [PATCH] blk-wbt: wake up all when we scale up, not down Josef Bacik
2018-10-11 19:31 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox