On Fri, Apr 24, 2020 at 06:23:47PM +0800, Ming Lei wrote: > Before one CPU becomes offline, check if it is the last online CPU of hctx. > If yes, mark this hctx as inactive, meantime wait for completion of all > in-flight IOs originated from this hctx. Meantime check if this hctx has > become inactive in blk_mq_get_driver_tag(), if yes, release the > allocated tag. > > This way guarantees that there isn't any inflight IO before shutdowning > the managed IRQ line when all CPUs of this IRQ line is offline. Can you take a look at all my comments on the previous version here (splitting blk_mq_get_driver_tag for direct_issue vs not, what is the point of barrier(), smp_mb__before_atomic and smp_mb__after_atomic), as none seems to be addressed and I also didn't see a reply.