Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1612565 > unrolled thread

[PATCH] block: do not put mq context in blk_mq_alloc_request_hctx

Started byMinchan Kim <minchan@kernel.org>
First post2017-03-30 07:30 +0200
Last post2017-03-30 16:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] block: do not put mq context in blk_mq_alloc_request_hctx Minchan Kim <minchan@kernel.org> - 2017-03-30 07:30 +0200
    Re: [PATCH] block: do not put mq context in blk_mq_alloc_request_hctx Sagi Grimberg <sagi@grimberg.me> - 2017-03-30 16:10 +0200

#1612565 — [PATCH] block: do not put mq context in blk_mq_alloc_request_hctx

FromMinchan Kim <minchan@kernel.org>
Date2017-03-30 07:30 +0200
Subject[PATCH] block: do not put mq context in blk_mq_alloc_request_hctx
Message-ID<tqAOJ-1uk-3@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1613111

FromSagi Grimberg <sagi@grimberg.me>
Date2017-03-30 16:10 +0200
Message-ID<tqIVY-7qR-23@gated-at.bofh.it>
In reply to#1612565
Looks good,

Reviewed-by: Sagi Grimberg <sagi@grimberg.me>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web