Thread (34 messages) 34 messages, 10 authors, 2019-03-21

Re: [PATCH 2/8] blk-mq: change the method of iterating busy tags of a request_queue

From: Keith Busch <kbusch@kernel.org>
Date: 2019-03-18 15:52:36
Also in: linux-nvme, lkml

On Sat, Mar 16, 2019 at 11:50:27PM -0700, Ming Lei wrote:
On Sat, Mar 16, 2019 at 12:15 AM Keith Busch [off-list ref] wrote:
quoted
On Fri, Mar 15, 2019 at 01:57:38AM -0700, Jianchao Wang wrote:
quoted
+     if (rq && rq->q == hctx->queue &&
+         rq->mq_hctx == hctx &&
+         (!iter_data->inflight ||
+          blk_mq_rq_state(rq) == MQ_RQ_IN_FLIGHT))
+             return iter_data->fn(rq, iter_data->data, reserved);
There is still a window where the check may succeed, but the request is
being assigned to a completely different request_queue. The callback
then operates on a request it doesn't own.
The situation above is only related with 'none' io scheduler.

However, this patch doesn't change behavior for none given .rq[tag] is same with
.static_rq[tag], so I guess your concern may not be related with this patch.
Right, it's not new, but queue iteration wasn't exported for drivers
before this.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help