[PATCH] nvme: core: freeze multipath queue early in nvme_update_ns_info()

Daniel Wagner dwagner at suse.de
Fri Aug 23 00:00:31 PDT 2024


On Thu, Aug 22, 2024 at 10:14:13PM GMT, Martin Wilck wrote:
> For multipath devices, nvme_update_ns_info() needs to freeze both
> the queue of the path and the queue of the multipath device. For
> both operations, it waits for one RCU grace period to pass, ~25ms
> on my test system. By calling blk_freeze_queue_start() for the
> multipath queue early, we avoid waiting twice; tests using ftrace
> have shown that the second blk_mq_freeze_queue_wait() call finishes
> in just a few microseconds. The path queue is unfrozen before
> calling blk_mq_freeze_queue_wait() on the multipath queue, so that
> possibly outstanding IO in the multipath queue can be flushed.
> 
> I tested this using the "controller rescan under I/O load" test
> I submitted recently [1].
> 
> [1] https://lore.kernel.org/linux-nvme/20240822193814.106111-3-mwilck@suse.com/T/#u
> 
> Signed-off-by: Martin Wilck <mwilck at suse.com>

Reviewed-by: Daniel Wagner <dwagner at suse.de>



More information about the Linux-nvme mailing list