Thanks, Yi > > Some on-site information: > > >>> rwb.rq_depth.max_depth > (unsigned int)48 > >>> rqw.inflight.counter.value_() > 44 > >>> rqw.inflight.counter.value_() > 35 > >>> prog['jiffies'] - rwb.rqos.q.backing_dev_info.last_bdp_sleep > (unsigned long)3 > >>> prog['jiffies'] - rwb.rqos.q.backing_dev_info.last_bdp_sleep > (unsigned long)2 > >>> prog['jiffies'] - rwb.rqos.q.backing_dev_info.last_bdp_sleep > (unsigned long)20 > >>> prog['jiffies'] - rwb.rqos.q.backing_dev_info.last_bdp_sleep > (unsigned long)12 > > cat wb_normal > 24 > cat wb_background > 12 > > To fix this issue, we can use max_depth in wbt_rqw_done(), so that > the handling of wb_recent_wait by wbt_rqw_done() and get_limit() > will also be consistent, which is more reasonable. > > Signed-off-by: Julian Sun <sunjunchao@xxxxxxxxxxxxx> > Fixes: e34cbd307477 ("blk-wbt: add general throttling mechanism") > --- > block/blk-wbt.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/block/blk-wbt.c b/block/blk-wbt.c > index a50d4cd55f41..d6a2782d442f 100644 > --- a/block/blk-wbt.c > +++ b/block/blk-wbt.c > @@ -210,6 +210,8 @@ static void wbt_rqw_done(struct rq_wb *rwb, struct rq_wait *rqw, > else if (blk_queue_write_cache(rwb->rqos.disk->queue) && > !wb_recent_wait(rwb)) > limit = 0; > + else if (wb_recent_wait(rwb)) > + limit = rwb->rq_depth.max_depth; > else > limit = rwb->wb_normal; > > -- > 2.20.1 > >