public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Lin Feng <linf@wangsu.com>
To: axboe@kernel.dk
Cc: linux-block@vger.kernel.org, linf@wangsu.com
Subject: [PATCH] Fix Revert "bfq: Fix computation of shallow depth" in linux-block.git
Date: Wed,  3 Feb 2021 11:31:13 +0800	[thread overview]
Message-ID: <20210203033113.100260-1-linf@wangsu.com> (raw)

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(-)

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


             reply	other threads:[~2021-02-03  3:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-03  3:31 Lin Feng [this message]
2021-02-03  3:37 ` [PATCH] Fix Revert "bfq: Fix computation of shallow depth" in linux-block.git Jens Axboe
2021-02-03  3:54   ` Lin Feng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210203033113.100260-1-linf@wangsu.com \
    --to=linf@wangsu.com \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox