On Mon, Feb 08, 2021 at 04:52:41PM +0800, Jeffle Xu wrote: > DM will iterate and poll all polling hardware queues of all target mq > devices when polling IO for dm device. To mitigate the race introduced > by iterating all target hw queues, a per-hw-queue flag is maintained What is the per-hw-queue flag? > to indicate whether this polling hw queue currently being polled on or > not. Every polling hw queue is exclusive to one polling instance, i.e., > the polling instance will skip this polling hw queue if this hw queue > currently is being polled by another polling instance, and start > polling on the next hw queue. Not see such skip in dm_poll_one_dev() in which queue_for_each_poll_hw_ctx() is called directly for polling all POLL hctxs of the request queue, so can you explain it a bit more about this skip mechanism? Even though such skipping is implemented, not sure if good performance can be reached because hctx poll may be done in ping-pong style among several CPUs. But blk-mq hctx is supposed to have its cpu affinities. -- Ming