[PATCH V2 0/2] nvme-loop: use xarray for ctrl and port list

Chaitanya Kulkarni chaitanya.kulkarni at wdc.com
Wed Sep 30 00:55:55 EDT 2020


Hi,

Currently ctrl and port tracking is done using the list & a global lock
respectively. Since this lock is only used to protect the list mgmt we
can safely get rid of the lock and use XArray.

This patch series replaces ctrl, port list & its respective locks
with XArray.

I've not tested this exaustively, but all the blktest testcases for
nvme-loop are passing [1].

Regards,
Chaitanya

* Changes from V2 :-
1. Rebase and retest on latest nvme-5.10.
2. Generate this series on the top of 
   http://lists.infradead.org/pipermail/linux-nvme/2020-September/020023.html

Chaitanya Kulkarni (2):
  nvme-loop: use xarray for loop ctrl tracking
  nvme-loop: use xarray for loop port tracking

 drivers/nvme/target/loop.c | 69 ++++++++++++++++++--------------------
 1 file changed, 32 insertions(+), 37 deletions(-)

[1] NVMeOF nvme-loop blktest results :-
root at vm blktests (master) # ./check tests/nvme/???
nvme/002 (create many subsystems and test discovery)         [passed]
    runtime  24.180s  ...  24.181s
nvme/003 (test if we're sending keep-alives to a discovery controller) [passed]
    runtime  10.130s  ...  10.128s
nvme/004 (test nvme and nvmet UUID NS descriptors)           [passed]
    runtime  2.876s  ...  2.880s
nvme/005 (reset local loopback target)                       [passed]
    runtime  3.467s  ...  3.459s
nvme/006 (create an NVMeOF target with a block device-backed ns) [passed]
    runtime  0.104s  ...  0.098s
nvme/007 (create an NVMeOF target with a file-backed ns)     [passed]
    runtime  0.060s  ...  0.056s
nvme/008 (create an NVMeOF host with a block device-backed ns) [passed]
    runtime  2.843s  ...  2.873s
nvme/009 (create an NVMeOF host with a file-backed ns)       [passed]
    runtime  2.815s  ...  2.804s
nvme/010 (run data verification fio job on NVMeOF block device-backed ns) [passed]
    runtime  26.820s  ...  32.029s
nvme/011 (run data verification fio job on NVMeOF file-backed ns) [passed]
    runtime  302.723s  ...  268.770s
nvme/012 (run mkfs and data verification fio job on NVMeOF block device-backed ns) [passed]
    runtime  42.882s  ...  41.107s
nvme/013 (run mkfs and data verification fio job on NVMeOF file-backed ns) [passed]
    runtime  142.143s  ...  128.990s
nvme/014 (flush a NVMeOF block device-backed ns)             [passed]
    runtime  23.945s  ...  23.363s
nvme/015 (unit test for NVMe flush for file backed ns)       [passed]
    runtime  22.146s  ...  19.836s
nvme/016 (create/delete many NVMeOF block device-backed ns and test discovery) [passed]
    runtime  15.456s  ...  15.097s
nvme/017 (create/delete many file-ns and test discovery)     [passed]
    runtime  15.267s  ...  15.184s
nvme/018 (unit test NVMe-oF out of range access on a file backend) [passed]
    runtime  2.806s  ...  2.842s
nvme/019 (test NVMe DSM Discard command on NVMeOF block-device ns) [passed]
    runtime  2.841s  ...  2.852s
nvme/020 (test NVMe DSM Discard command on NVMeOF file-backed ns) [passed]
    runtime  2.834s  ...  2.873s
nvme/021 (test NVMe list command on NVMeOF file-backed ns)   [passed]
    runtime  2.850s  ...  2.828s
nvme/022 (test NVMe reset command on NVMeOF file-backed ns)  [passed]
    runtime  3.415s  ...  3.422s
nvme/023 (test NVMe smart-log command on NVMeOF block-device ns) [passed]
    runtime  2.870s  ...  2.853s
nvme/024 (test NVMe smart-log command on NVMeOF file-backed ns) [passed]
    runtime  2.827s  ...  2.826s
nvme/025 (test NVMe effects-log command on NVMeOF file-backed ns) [passed]
    runtime  2.862s  ...  2.812s
nvme/026 (test NVMe ns-descs command on NVMeOF file-backed ns) [passed]
    runtime  2.836s  ...  2.809s
nvme/027 (test NVMe ns-rescan command on NVMeOF file-backed ns) [passed]
    runtime  2.877s  ...  2.878s
nvme/028 (test NVMe list-subsys command on NVMeOF file-backed ns) [passed]
    runtime  2.835s  ...  2.822s
nvme/029 (test userspace IO via nvme-cli read/write interface) [passed]
    runtime  3.157s  ...  3.163s
nvme/030 (ensure the discovery generation counter is updated appropriately) [passed]
    runtime  0.352s  ...  0.349s
nvme/031 (test deletion of NVMeOF controllers immediately after setup) [passed]
    runtime  17.561s  ...  17.649s

-- 
2.22.1




More information about the Linux-nvme mailing list