linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: linux-block@vger.kernel.org
Cc: osandov@fb.com, efault@gmx.de, paolo.valente@linaro.org,
	Jens Axboe <axboe@kernel.dk>
Subject: [PATCH 7/7] kyber-iosched: update shallow depth when setting up hardware queue
Date: Wed,  9 May 2018 14:49:27 -0600	[thread overview]
Message-ID: <1525898967-13425-8-git-send-email-axboe@kernel.dk> (raw)
In-Reply-To: <1525898967-13425-1-git-send-email-axboe@kernel.dk>

We don't expect the async depth to be smaller than the wake batch
count for sbitmap, but just in case, inform sbitmap of what shallow
depth kyber may use.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
 block/kyber-iosched.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/block/kyber-iosched.c b/block/kyber-iosched.c
index 564967fafe5f..b1b927224cd4 100644
--- a/block/kyber-iosched.c
+++ b/block/kyber-iosched.c
@@ -378,6 +378,7 @@ static void kyber_exit_sched(struct elevator_queue *e)
 
 static int kyber_init_hctx(struct blk_mq_hw_ctx *hctx, unsigned int hctx_idx)
 {
+	struct kyber_queue_data *kqd = hctx->queue->elevator->elevator_data;
 	struct kyber_hctx_data *khd;
 	int i;
 
@@ -400,6 +401,8 @@ static int kyber_init_hctx(struct blk_mq_hw_ctx *hctx, unsigned int hctx_idx)
 	khd->batching = 0;
 
 	hctx->sched_data = khd;
+	sbitmap_queue_shallow_depth(&hctx->sched_tags->bitmap_tags,
+					kqd->async_depth);
 
 	return 0;
 }
-- 
2.7.4

  parent reply	other threads:[~2018-05-09 20:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-09 20:49 [PATCHSET v2 0/7] blk-mq-sched and sbitmap shallow depth Jens Axboe
2018-05-09 20:49 ` [PATCH 1/7] blk-mq: don't call into depth limiting for reserved tags Jens Axboe
2018-05-09 20:49 ` [PATCH 2/7] bfq-iosched: don't worry about reserved tags in limit_depth Jens Axboe
2018-05-09 20:49 ` [PATCH 3/7] bfq: calculate shallow depths at init time Jens Axboe
2018-05-09 20:49 ` [PATCH 4/7] sbitmap: add helper to inform the core about shallow depth limiting Jens Axboe
2018-05-09 20:49 ` [PATCH 5/7] bfq-iosched: update shallow depth to smallest one used Jens Axboe
2018-05-09 20:49 ` [PATCH 6/7] bfq-iosched: remove unused variable Jens Axboe
2018-05-09 20:49 ` Jens Axboe [this message]
2018-05-10  4:32 ` [PATCHSET v2 0/7] blk-mq-sched and sbitmap shallow depth Paolo Valente
2018-05-10 16:20   ` Jens Axboe

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=1525898967-13425-8-git-send-email-axboe@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=efault@gmx.de \
    --cc=linux-block@vger.kernel.org \
    --cc=osandov@fb.com \
    --cc=paolo.valente@linaro.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;
as well as URLs for NNTP newsgroup(s).