Message ID | 20200730090321.38781-1-zhouchengming@bytedance.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | iocost: Fix check condition of iocg abs_vdebt | expand |
Hello, On Thu, Jul 30, 2020 at 05:03:21PM +0800, Chengming Zhou wrote: > We shouldn't skip iocg when its abs_vdebt is not zero. > > Fixes: 0b80f9866e6b ("iocost: protect iocg->abs_vdebt with > iocg->waitq.lock") > > Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com> Acked-by: Tejun Heo <tj@kernel.org> Thanks.
On 7/30/20 3:03 AM, Chengming Zhou wrote: > We shouldn't skip iocg when its abs_vdebt is not zero. Applied, thanks. > Fixes: 0b80f9866e6b ("iocost: protect iocg->abs_vdebt with > iocg->waitq.lock") Minor note, and I fixed this up, but these should be one line.
diff --git a/block/blk-iocost.c b/block/blk-iocost.c index 8ac4aad66ebc..86ba6fd254e1 100644 --- a/block/blk-iocost.c +++ b/block/blk-iocost.c @@ -1370,7 +1370,7 @@ static void ioc_timer_fn(struct timer_list *timer) * should have woken up in the last period and expire idle iocgs. */ list_for_each_entry_safe(iocg, tiocg, &ioc->active_iocgs, active_list) { - if (!waitqueue_active(&iocg->waitq) && iocg->abs_vdebt && + if (!waitqueue_active(&iocg->waitq) && !iocg->abs_vdebt && !iocg_is_idle(iocg)) continue;
We shouldn't skip iocg when its abs_vdebt is not zero. Fixes: 0b80f9866e6b ("iocost: protect iocg->abs_vdebt with iocg->waitq.lock") Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com> --- block/blk-iocost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)