Thread (28 messages) 28 messages, 4 authors, 2021-12-10

Re: [PATCH 1/5] blk-mq: move srcu from blk_mq_hw_ctx to request_queue

From: Ming Lei <hidden>
Date: 2021-11-22 13:08:55
Also in: linux-nvme, linux-scsi

On Mon, Nov 22, 2021 at 09:48:35AM +0200, Sagi Grimberg wrote:
quoted
quoted
quoted
+	bool			alloc_srcu;
I found the following statement multiple times in this patch:

WARN_ON_ONCE(q->alloc_srcu != !!(q->tag_set->flags & BLK_MQ_F_BLOCKING));

Does this mean that the new q->alloc_srcu member variable can be left out
and that it can be replaced with the following test?

q->tag_set->flags & BLK_MQ_F_BLOCKING
q->tag_set can't be used anymore after blk_cleanup_queue() returns,
and we need the flag for freeing request_queue instance.
Why not just look at the queue->srcu pointer? it is allocated only
for BLK_MQ_F_BLOCKING no?
Yeah, we can add one extra srcu pointer to request queue, but this way
needs one extra fetch to q->srcu in fast path compared with current
code base, so io_uring workload may be affected a bit.

Thanks,
Ming
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help