From: Jens Axboe <axboe@kernel.dk>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] blk-mq: fix blk_mq_start_stopped_hw_queues from irq context
Date: Sun, 6 Oct 2013 12:10:13 -0600 [thread overview]
Message-ID: <20131006181013.GE8252@kernel.dk> (raw)
In-Reply-To: <20131006170956.GA30544@infradead.org>
On Sun, Oct 06 2013, Christoph Hellwig wrote:
> The only caller of blk_mq_start_stopped_hw_queues is in irq context,
> leading to lockdep splat when it actually gets called. Fix this by
> deferring the hw queue run to workqueue context.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
>
> diff --git a/block/blk-mq.c b/block/blk-mq.c
> index 2b85029..923e9e1 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -686,7 +686,8 @@ void blk_mq_start_stopped_hw_queues(struct request_queue *q)
> if (!test_bit(BLK_MQ_S_STOPPED, &hctx->state))
> continue;
>
> - blk_mq_start_hw_queue(hctx);
> + clear_bit(BLK_MQ_S_STOPPED, &hctx->state);
> + blk_mq_run_hw_queue(hctx, true);
> }
> }
> EXPORT_SYMBOL(blk_mq_start_stopped_hw_queues);
Thanks, applied. Might not be a bad idea to just mimic the run queue
API, and provide a blk_mq_start_hw_queue(hctx, is_async) instead.
--
Jens Axboe
next prev parent reply other threads:[~2013-10-06 18:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-06 17:09 [PATCH] blk-mq: fix blk_mq_start_stopped_hw_queues from irq context Christoph Hellwig
2013-10-06 18:10 ` Jens Axboe [this message]
2013-10-07 19:33 ` Christoph Hellwig
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=20131006181013.GE8252@kernel.dk \
--to=axboe@kernel.dk \
--cc=hch@infradead.org \
--cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.