From: Minchan Kim <minchan@kernel.org>
To: Jens Axboe <axboe@fb.com>
Cc: kernel-team@lge.com, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org, Minchan Kim <minchan@kernel.org>,
Sagi Grimberg <sagi@grimberg.me>, Omar Sandoval <osandov@fb.com>
Subject: [PATCH] block: do not put mq context in blk_mq_alloc_request_hctx
Date: Thu, 30 Mar 2017 14:20:45 +0900 [thread overview]
Message-ID: <1490851245-32245-1-git-send-email-minchan@kernel.org> (raw)
In blk_mq_alloc_request_hctx, blk_mq_sched_get_request doesn't
get sw context so we don't need to put the context with
blk_mq_put_ctx. Unless, we will see preempt counter underflow.
Cc: Sagi Grimberg <sagi@grimberg.me>
Cc: Omar Sandoval <osandov@fb.com>
Cc: Jens Axboe <axboe@fb.com>
Signed-off-by: Minchan Kim <minchan@kernel.org>
---
Maybe, it would be fixed by someone but I have noticed preempt counter
undeflow problem a few weeks ago and still see the problem with
linux-next.
block/blk-mq.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index a4546f060e80..a6f3998dc4ee 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -321,7 +321,6 @@ struct request *blk_mq_alloc_request_hctx(struct request_queue *q, int rw,
rq = blk_mq_sched_get_request(q, NULL, rw, &alloc_data);
- blk_mq_put_ctx(alloc_data.ctx);
blk_queue_exit(q);
if (!rq)
--
2.7.4
next reply other threads:[~2017-03-30 5:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-30 5:20 Minchan Kim [this message]
2017-03-30 14:02 ` [PATCH] block: do not put mq context in blk_mq_alloc_request_hctx Sagi Grimberg
2017-03-30 14:12 ` 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=1490851245-32245-1-git-send-email-minchan@kernel.org \
--to=minchan@kernel.org \
--cc=axboe@fb.com \
--cc=kernel-team@lge.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=osandov@fb.com \
--cc=sagi@grimberg.me \
/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).