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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 22 Feb 2016 14:01:25 -0800
From:	Shaohua Li <shli@...com>
To:	<linux-kernel@...r.kernel.org>, <linux-block@...r.kernel.org>
CC:	<axboe@...nel.dk>, <tj@...nel.org>,
	Vivek Goyal <vgoyal@...hat.com>,
	"jmoyer @ redhat . com" <jmoyer@...hat.com>, <Kernel-team@...com>
Subject: [PATCH V2 10/13] blk-throttle: over estimate bandwidth

If we don't dispatch enough requests, disk can't reach the max
bandwidth. As we don't know the max bandwidth, we over estimate the
bandwidth and dispatch more requests. This way the disk can reach the
max bandwidth slowly. The downside is this can introduce fairness issue,
but since we only over estimate 1/8 extra bandwidth, the fairness issue
isn't big. But again, this could cause fairness issue for specific
workloads.

Signed-off-by: Shaohua Li <shli@...com>
---
 block/blk-throttle.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index 68e2598..f78d470 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -281,6 +281,8 @@ static inline uint64_t queue_bandwidth(struct throtl_data *td)
 	/* can't estimate bandwidth, can't do proporation control */
 	if (bw == 0)
 		bw = -1;
+	else
+		bw += bw >> 3;
 	return bw;
 }
 
@@ -292,6 +294,8 @@ static inline uint64_t queue_iops(struct throtl_data *td)
 	/* can't estimate iops, can't do proporation control */
 	if (iops == 0)
 		iops = -1;
+	else
+		iops += iops >> 3;
 	return iops;
 }
 
-- 
2.6.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ