[PATCH] nvme: Add weighted-round-robin arbitration support

Keith Busch keith.busch at intel.com
Thu Jan 4 09:38:04 PST 2018


On Thu, Jan 04, 2018 at 08:32:09PM +0530, Kanchan Joshi wrote:
> This patch enables support for Weighted-Round-Robin (WRR) arbitration, so
> that applications can make use of the prioritization capabilities natively
> present in NVMe controller.
> 
> - It links existing io-nice classes (real-time, best-effort, none, low)
> to NVMe priorities (urgent, high, medium, low).  This is done through
> 'request->ioprio' field inside 'queue_rq' function.
> 
> - Current driver has 1:1 mapping (1 SQ, 1 CQ) per cpu, encapsulated in
> 'nvmeq' structure.  This patch refactors the code so that N:1 mapping per
> cpu can be created; 'nvmeq' has been changed to contain variable number of SQ
> related fields.  For WRR, 4 submission-queues (corresponding to each queue
> priorites) need to be created on each cpu.

You have a single tagset per CQ for up to N oustandanding commands, but
allocate enough submission entries for 4 * N. And since they're sharing
tags, a lower pri task can limit a high-pri one from getting a tag. I
think we could use a little more help from the block layer for WRR.



More information about the Linux-nvme mailing list