[PATCH] Fix Revert "bfq: Fix computation of shallow depth" in linux-block.git

Subsystems: bfq i/o scheduler, block layer, the rest

STALE2089d

3 messages, 2 authors, 2021-02-03 · open the first message on its own page

[PATCH] Fix Revert "bfq: Fix computation of shallow depth" in linux-block.git

From: Lin Feng <hidden>
Date: 2021-02-03 03:33:14

Hi Jens,

Not yet got your mail, but per https://lkml.org/lkml/2021/2/2/1901, this patch
 is the incremental. Codes based on:
https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/patch/?id=8a483b42b1b3cef7e72564cdcdde62a373bd2f01

Notes: After checking previous hand-applied patch in block-5.11 broken 2 lines
in original patch, the incremental covers all.

Thanks.

Signed-off-by: Lin Feng <redacted>
---
 block/bfq-iosched.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index 959e25c..9e81d10 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -6332,13 +6332,13 @@ static unsigned int bfq_update_depths(struct bfq_data *bfqd,
 	 * limit 'something'.
 	 */
 	/* no more than 50% of tags for async I/O */
-	bfqd->word_depths[0][1] = max(((1U << bt->sb.shift) * 3) >> 2, 1U);
+	bfqd->word_depths[0][0] = max((1U << bt->sb.shift) >> 1, 1U);
 	/*
 	 * no more than 75% of tags for sync writes (25% extra tags
 	 * w.r.t. async I/O, to prevent async I/O from starving sync
 	 * writes)
 	 */
-	bfqd->word_depths[0][1] = max((bt->sb.depth * 3) >> 2, 1U);
+	bfqd->word_depths[0][1] = max(((1U << bt->sb.shift) * 3) >> 2, 1U);
 
 	/*
 	 * In-word depths in case some bfq_queue is being weight-
-- 
2.25.4

Re: [PATCH] Fix Revert "bfq: Fix computation of shallow depth" in linux-block.git

From: Jens Axboe <axboe@kernel.dk>
Date: 2021-02-03 03:38:41

On 2/2/21 8:31 PM, Lin Feng wrote:
Hi Jens,

Not yet got your mail, but per https://lkml.org/lkml/2021/2/2/1901, this patch
 is the incremental. Codes based on:
https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/patch/?id=8a483b42b1b3cef7e72564cdcdde62a373bd2f01

Notes: After checking previous hand-applied patch in block-5.11 broken 2 lines
in original patch, the incremental covers all.
Thanks, folded in. Please check the resulting patch:

https://git.kernel.dk/cgit/linux-block/commit/?h=block-5.11&id=388c705b95f23f317fa43e6abf9ff07b583b721a

-- 
Jens Axboe

Re: [PATCH] Fix Revert "bfq: Fix computation of shallow depth" in linux-block.git

From: Lin Feng <hidden>
Date: 2021-02-03 03:56:13


On 2/3/21 11:37, Jens Axboe wrote:
On 2/2/21 8:31 PM, Lin Feng wrote:
quoted
Hi Jens,

Not yet got your mail, but per https://lkml.org/lkml/2021/2/2/1901, this patch
  is the incremental. Codes based on:
https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/patch/?id=8a483b42b1b3cef7e72564cdcdde62a373bd2f01

Notes: After checking previous hand-applied patch in block-5.11 broken 2 lines
in original patch, the incremental covers all.
Thanks, folded in. Please check the resulting patch:

https://git.kernel.dk/cgit/linux-block/commit/?h=block-5.11&id=388c705b95f23f317fa43e6abf9ff07b583b721a
Yes, it's correct :)

Thanks,
linfeng
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help