lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200801170021.76756-1-zhouchengming@bytedance.com>
Date:   Sun,  2 Aug 2020 01:00:21 +0800
From:   Chengming Zhou <zhouchengming@...edance.com>
To:     axboe@...nel.dk, tj@...nel.org, linux-block@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     Chengming Zhou <zhouchengming@...edance.com>
Subject: [PATCH] iocost: Only inc nr_shortages when have io waited

The last else branch of current code may have not io waited in iocg,
in which case we should not inc nr_shortages, or the device vrate
will speed up even this iocg is not shortage of vtime.

Signed-off-by: Chengming Zhou <zhouchengming@...edance.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 86ba6fd254e1..ce68b5749364 100644
--- a/block/blk-iocost.c
+++ b/block/blk-iocost.c
@@ -1485,7 +1485,7 @@ static void ioc_timer_fn(struct timer_list *timer)
 				__propagate_active_weight(iocg, iocg->weight,
 							  new_inuse);
 			}
-		} else {
+		} else if (waitqueue_active(&iocg->waitq)) {
 			/* genuninely out of vtime */
 			nr_shortages++;
 		}
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ