Linux-Block Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] iocost: Fix check condition of iocg abs_vdebt
@ 2020-07-30  9:03 Chengming Zhou
  2020-07-30 14:14 ` Tejun Heo
  2020-07-30 17:46 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Chengming Zhou @ 2020-07-30  9:03 UTC (permalink / raw)
  To: tj, axboe, linux-block, linux-kernel; +Cc: zhouchengming

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(-)

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;
 
-- 
2.20.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] iocost: Fix check condition of iocg abs_vdebt
  2020-07-30  9:03 [PATCH] iocost: Fix check condition of iocg abs_vdebt Chengming Zhou
@ 2020-07-30 14:14 ` Tejun Heo
  2020-07-30 17:46 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Tejun Heo @ 2020-07-30 14:14 UTC (permalink / raw)
  To: Chengming Zhou; +Cc: axboe, linux-block, linux-kernel

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.

-- 
tejun

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] iocost: Fix check condition of iocg abs_vdebt
  2020-07-30  9:03 [PATCH] iocost: Fix check condition of iocg abs_vdebt Chengming Zhou
  2020-07-30 14:14 ` Tejun Heo
@ 2020-07-30 17:46 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2020-07-30 17:46 UTC (permalink / raw)
  To: Chengming Zhou, tj, linux-block, linux-kernel

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.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-30  9:03 [PATCH] iocost: Fix check condition of iocg abs_vdebt Chengming Zhou
2020-07-30 14:14 ` Tejun Heo
2020-07-30 17:46 ` Jens Axboe

Linux-Block Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-block/0 linux-block/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-block linux-block/ https://lore.kernel.org/linux-block \
		linux-block@vger.kernel.org
	public-inbox-index linux-block

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-block


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git