diff mbox series

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

Message ID 20210203033113.100260-1-linf@wangsu.com (mailing list archive)
State New, archived
Headers show
Series Fix Revert "bfq: Fix computation of shallow depth" in linux-block.git | expand

Commit Message

Lin Feng Feb. 3, 2021, 3:31 a.m. UTC
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 <linf@wangsu.com>
---
 block/bfq-iosched.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jens Axboe Feb. 3, 2021, 3:37 a.m. UTC | #1
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
Lin Feng Feb. 3, 2021, 3:54 a.m. UTC | #2
On 2/3/21 11:37, Jens Axboe wrote:
> 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
> 

Yes, it's correct :)

Thanks,
linfeng
diff mbox series

Patch

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-