From: Tejun Heo <tj@kernel.org>
To: Ming Lei <tom.leiming@gmail.com>
Cc: Jens Axboe <axboe@kernel.dk>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Kent Overstreet <kmo@daterainc.com>,
"Nicholas A. Bellinger" <nab@linux-iscsi.org>
Subject: Re: [PATCH 1/6] blk-mq: make blk_mq_stop_hw_queue() reliably block queue processing
Date: Thu, 19 Jun 2014 09:12:20 -0400 [thread overview]
Message-ID: <20140619131220.GE11042@htj.dyndns.org> (raw)
In-Reply-To: <CACVXFVMhkKgvzXO7QnXRup3wqy2Bom-iPWVQoe_EGZkSMcneag@mail.gmail.com>
Hello, Ming.
On Thu, Jun 19, 2014 at 06:10:28PM +0800, Ming Lei wrote:
> > void blk_mq_stop_hw_queue(struct blk_mq_hw_ctx *hctx)
> > {
> > - cancel_delayed_work(&hctx->run_work);
> > - cancel_delayed_work(&hctx->delay_work);
> > set_bit(BLK_MQ_S_STOPPED, &hctx->state);
> > + cancel_delayed_work_sync(&hctx->run_work);
> > + cancel_delayed_work_sync(&hctx->delay_work);
>
> The function can be called from atomic context, like virtio-blk.
>
> Currently blk_mq_stop_hw_queue() is called in case of queue
> being busy, so looks it is ok with cancel_delayed_work().
Hmm... you're right. So the function is used to stop future
invocations of the queue processing function and thus the order
doesn't matter. We probably wanna document that. I don't understand
why virblk_freeze() is invoking it tho. If freezing is complete,
there's no request in-flight on the driver side, why does it need to
invoke stop too?
Jens, please drop this one.
Thanks.
--
tejun
next prev parent reply other threads:[~2014-06-19 13:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-18 15:21 [PATCHSET block/for-next] blk-mq: update freezing Tejun Heo
2014-06-18 15:21 ` [PATCH 1/6] blk-mq: make blk_mq_stop_hw_queue() reliably block queue processing Tejun Heo
2014-06-19 10:10 ` Ming Lei
2014-06-19 13:12 ` Tejun Heo [this message]
2014-06-18 15:21 ` [PATCH 2/6] blk-mq: fix a memory ordering bug in blk_mq_queue_enter() Tejun Heo
2014-06-18 15:21 ` [PATCH 3/6] block, blk-mq: draining can't be skipped even if bypass_depth was non-zero Tejun Heo
2014-06-18 15:21 ` [PATCH 4/6] blk-mq: decouble blk-mq freezing from generic bypassing Tejun Heo
2014-06-18 15:21 ` [PATCH 5/6] blk-mq: collapse __blk_mq_drain_queue() into blk_mq_freeze_queue() Tejun Heo
2014-06-18 15:21 ` [PATCH 6/6] blk-mq: use percpu_ref for mq usage count Tejun Heo
2014-06-18 16:19 ` [PATCHSET block/for-next] blk-mq: update freezing Jens Axboe
2014-06-28 12:13 ` Tejun Heo
2014-06-28 14:29 ` 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=20140619131220.GE11042@htj.dyndns.org \
--to=tj@kernel.org \
--cc=axboe@kernel.dk \
--cc=kmo@daterainc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nab@linux-iscsi.org \
--cc=tom.leiming@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
all inboxes | Powered by JetHome®