linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Jens Axboe <axboe@fb.com>,
	linux-block@vger.kernel.org,
	Christoph Hellwig <hch@infradead.org>
Cc: Bart Van Assche <bart.vanassche@sandisk.com>,
	Laurence Oberman <loberman@redhat.com>,
	Paolo Valente <paolo.valente@linaro.org>,
	Oleksandr Natalenko <oleksandr@natalenko.name>,
	Tom Nguyen <tom81094@gmail.com>,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	Omar Sandoval <osandov@fb.com>,
	John Garry <john.garry@huawei.com>,
	Ming Lei <ming.lei@redhat.com>
Subject: [PATCH V10 4/8] block: kyber: check if there is request in ctx in kyber_has_work()
Date: Sat, 14 Oct 2017 17:22:28 +0800	[thread overview]
Message-ID: <20171014092232.13943-5-ming.lei@redhat.com> (raw)
In-Reply-To: <20171014092232.13943-1-ming.lei@redhat.com>

There may be request in sw queue, and not fetched to domain queue
yet, so check it in kyber_has_work().

Signed-off-by: Ming Lei <ming.lei@redhat.com>
---
 block/kyber-iosched.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/kyber-iosched.c b/block/kyber-iosched.c
index f58cab82105b..94df3ce99f2f 100644
--- a/block/kyber-iosched.c
+++ b/block/kyber-iosched.c
@@ -641,7 +641,7 @@ static bool kyber_has_work(struct blk_mq_hw_ctx *hctx)
 		if (!list_empty_careful(&khd->rqs[i]))
 			return true;
 	}
-	return false;
+	return sbitmap_any_bit_set(&hctx->ctx_map);
 }
 
 #define KYBER_LAT_SHOW_STORE(op)					\
-- 
2.9.5

  parent reply	other threads:[~2017-10-14  9:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-14  9:22 [PATCH V10 0/8] blk-mq-sched: improve sequential I/O performance Ming Lei
2017-10-14  9:22 ` [PATCH V10 1/8] blk-mq-sched: dispatch from scheduler only after progress is made on ->dispatch Ming Lei
2017-10-14  9:22 ` [PATCH V10 2/8] blk-mq-sched: move actual dispatching into one helper Ming Lei
2017-10-14  9:22 ` [PATCH V10 3/8] sbitmap: introduce __sbitmap_for_each_set() Ming Lei
2017-10-14  9:22 ` Ming Lei [this message]
2017-10-14  9:22 ` [PATCH V10 5/8] blk-mq: introduce .get_budget and .put_budget in blk_mq_ops Ming Lei
2017-10-14  9:22 ` [PATCH V10 6/8] blk-mq-sched: improve dispatching from sw queue Ming Lei
2017-10-14  9:22 ` [PATCH V10 7/8] SCSI: allow to pass null rq to scsi_prep_state_check() Ming Lei
2017-10-14  9:22 ` [PATCH V10 8/8] SCSI: implement .get_budget and .put_budget for blk-mq Ming Lei
2017-10-14 15:39 ` [PATCH V10 0/8] blk-mq-sched: improve sequential I/O performance 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=20171014092232.13943-5-ming.lei@redhat.com \
    --to=ming.lei@redhat.com \
    --cc=axboe@fb.com \
    --cc=bart.vanassche@sandisk.com \
    --cc=hch@infradead.org \
    --cc=john.garry@huawei.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=loberman@redhat.com \
    --cc=oleksandr@natalenko.name \
    --cc=osandov@fb.com \
    --cc=paolo.valente@linaro.org \
    --cc=tom81094@gmail.com \
    /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).