Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1339959 > unrolled thread

[PATCH V2 10/13] blk-throttle: over estimate bandwidth

Started byShaohua Li <shli@fb.com>
First post2016-02-22 23:10 +0100
Last post2016-02-22 23:10 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH V2 10/13] blk-throttle: over estimate bandwidth Shaohua Li <shli@fb.com> - 2016-02-22 23:10 +0100

#1339959 — [PATCH V2 10/13] blk-throttle: over estimate bandwidth

FromShaohua Li <shli@fb.com>
Date2016-02-22 23:10 +0100
Subject[PATCH V2 10/13] blk-throttle: over estimate bandwidth
Message-ID<r56Q1-3YI-1@gated-at.bofh.it>
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@fb.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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web