From: 胡海 <huhai@kylinos.cn>
To: axboe <axboe@kernel.dk>
Cc: linux-block <linux-block@vger.kernel.org>, hch <hch@lst.de>
Subject: blk-mq: for sync case, whether it is mq or sq make_request instances, we should send the request directly
Date: Wed, 16 May 2018 10:44:44 +0800 [thread overview]
Message-ID: <tencent_1349131F26ECB129026E2168@qq.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1080 bytes --]
Author: huhai <huhai@kylinos.cn>
Date: Wed May 16 10:34:22 2018 +0800
blk-mq: for sync case, whether it is mq or sq make_request instances, we should send the request directly
For sq make_request instances, we should issue sync request directly too,
otherwise it will break down the semantics of sync request,
the current code logic is to send synchronous requests asynchronously.
Signed-off-by: huhai <huhai@kylinos.cn>
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 5629f18..fcf2f16 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1771,7 +1771,7 @@ static blk_qc_t blk_mq_make_request(struct request_queue *q, struct bio *bio)
blk_mq_try_issue_directly(data.hctx, same_queue_rq,
&cookie);
}
- } else if (q->nr_hw_queues > 1 && is_sync) {
+ } else if (is_sync) {
blk_mq_put_ctx(data.ctx);
blk_mq_bio_to_request(rq, bio);
blk_mq_try_issue_directly(data.hctx, rq, &cookie);
[-- Attachment #2: Type: text/html, Size: 2002 bytes --]
next reply other threads:[~2018-05-16 2:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-16 2:44 胡海 [this message]
2018-05-16 2:54 blk-mq: for sync case, whether it is mq or sq make_request instances, we should send the request directly 胡海
2018-05-16 2:56 胡海
2018-05-16 3:24 胡海
2018-05-16 3:42 胡海
2018-05-16 14:15 ` Jens Axboe
2018-05-16 3:43 胡海
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=tencent_1349131F26ECB129026E2168@qq.com \
--to=huhai@kylinos.cn \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--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;
as well as URLs for NNTP newsgroup(s).