On Mon, Jun 03, 2019 at 09:57:26AM +0100, John Garry wrote: > > > > Otherwise duplicated slot can be used from different blk-mq hw queue. > > > > > > > > > > > > > > > The worsen thing is that V3's actual max queue depth is (4096 - 96), but > > > > > > this patch claims that the device can support (4096 - 96) * 32 command > > > > > > slots > > > > > > To be clear about the hw, the hw supports max 4096 command tags and has 16 > > > > Is 4096 the max allowed host-wide command tags? Or per-queue's max commands > > tags? > > 4096 is max allowed host wide, in range [0, 4096), and tags are not per > queue. HW delivery queues can be configured to be as large as desired. Then all delivery(and complete) queues share the 4096 command slots, we can't convert hisi_sas V3 into typical blk-mq MQ model simply as done by Hannes's patch. Or you may partition the 4096 tags into 16 queues, then each queue's depth is ~256. Depends on if performance is good for workloads. You still can build a unique tag easily in [0, 4096), such as (req->tag * hw_queue_index). blk-mq's hw queue has independent tags, which is from NVMe's submission/completion queue. > > And on another point I saw mentioned, the device supports multiple > submission and multiple completion queues. They are symmetrical, and any > command will always complete on the same queue index which it was submitted. DQ & CQ did confuse me a bit, :-) Thanks, Ming