Thread (55 messages) 55 messages, 6 authors, 2017-05-10

Re: [PATCH 0/4] blk-mq: support to use hw tag for scheduling

From: Bart Van Assche <hidden>
Date: 2017-05-03 17:41:26

On Thu, 2017-05-04 at 01:19 +0800, Ming Lei wrote:
On Wed, May 03, 2017 at 05:08:30PM +0000, Bart Van Assche wrote:
quoted
Callers of blk_mq_quiesce_queue() really need blk_mq_stop_hw_queue() to
cancel delayed work synchronously. The above call stack shows that we h=
ave
quoted
to do something about the blk_mq_stop_hw_queue() calls from inside .que=
ue_rq()
quoted
functions for queues for which BLK_MQ_F_BLOCKING has not been set. I'm =
not
quoted
sure what the best approach would be: setting BLK_MQ_F_BLOCKING for que=
ues
quoted
that call blk_mq_stop_hw_queue() from inside .queue_rq() or creating tw=
o
quoted
versions of blk_mq_stop_hw_queue().
=20
I think either synchronize_srcu() or synchronize_rcu() can handle=20
this, since they are waiting for completion of .queue_rq(). So looks
cancel_delayed_work_sync() shouldn't be needed?
Hello Ming,

What you wrote is not correct. synchronize_*rcu() only waits for ongoing
.queue_rq() calls. cancel_delayed_work() will return immediately if it is
called after hctx->run_work has already been started. And the hctx->run_wor=
k
handler can trigger new .queue_rq() calls after synchronize_*rcu() has
already returned.

Bart.=
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help