From: sagi@grimberg.me (Sagi Grimberg)
Subject: [PATCH] nvme: Add weighted-round-robin arbitration support
Date: Sun, 14 Jan 2018 11:56:49 +0200 [thread overview]
Message-ID: <e9a8ceea-0568-b712-326f-adff2f07121a@grimberg.me> (raw)
In-Reply-To: <1515078129-4041-1-git-send-email-joshi.k@samsung.com>
Hi Joshi,
> 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.
>
> - When 'enable_wrr' module param is passed, it creates 4:1 mapping and enables
> controller in WRR mode. Otherwise, it cotinues to retain 1:1 mapping and
> controller remains in RR mode.
>
> - NVMe device may have less number of queues than required for 4:1 mapping
> per cpu. For example, when num_possible_cpus is 64, 256 submission-queues are
> required for 4:1 mapping while device may support, say, 128.
> This case is handled by creating 32 queue-pairs which are shared among 64 cpus.
> Another way to handle this could have been reducing to 3:1 or 2:1 mapping
> (and remapping 4 ionice classes as well).
>
> -Admin queue, contains 1:1 mapping irrespective of the mode (RR or WRR) used.
Regardless the dicussion with Keihth, this patch should be divided into
three or four preparatory patches and the wrr patch.
1. keeping nvmeq->cq_db
2. changing nvme_enable_ctrl not to set ctrl_config (needs to verify
doesn't break anything)
3. keeping multiple sqs per nvmeq and plumbing the sq_index
4. wire up wrr
This is true also if this is moving to blk-mq
prev parent reply other threads:[~2018-01-14 9:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20180104150334epcas1p14579a6ab7bcf1b6ce326d0bce89c91e1@epcas1p1.samsung.com>
2018-01-04 15:02 ` [PATCH] nvme: Add weighted-round-robin arbitration support Kanchan Joshi
2018-01-04 17:38 ` Keith Busch
2018-01-09 13:50 ` Kanchan Joshi
2018-01-09 17:05 ` Keith Busch
2018-01-10 15:27 ` Kanchan Joshi
2018-01-10 23:57 ` Keith Busch
2018-01-14 9:56 ` Sagi Grimberg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e9a8ceea-0568-b712-326f-adff2f07121a@grimberg.me \
--to=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox