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

Chaitanya Kulkarni chaitanya.kulkarni at wdc.com
Thu Sep 24 19:51:28 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 and port list & its respective locks
with XArray.

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

After I get some feedback I'll send V2 tested with corner cases.

Regards,
Chaitanya

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

 drivers/nvme/target/loop.c | 79 +++++++++++++++++---------------------
 1 file changed, 36 insertions(+), 43 deletions(-)

[1] NVMeOF nvme-loop blktest results :-

 # for i in tests/nvme/???; do ./check $i; done 
nvme/002 (create many subsystems and test discovery)         [passed]
    runtime  21.565s  ...  22.434s
nvme/003 (test if we're sending keep-alives to a discovery controller) [passed]
    runtime  10.130s  ...  10.124s
nvme/004 (test nvme and nvmet UUID NS descriptors)           [passed]
    runtime  2.847s  ...  2.865s
nvme/005 (reset local loopback target)                       [passed]
    runtime  3.513s  ...  3.408s
nvme/006 (create an NVMeOF target with a block device-backed ns) [passed]
    runtime  0.099s  ...  0.095s
nvme/007 (create an NVMeOF target with a file-backed ns)     [passed]
    runtime  0.051s  ...  0.054s
nvme/008 (create an NVMeOF host with a block device-backed ns) [passed]
    runtime  2.882s  ...  2.836s
nvme/009 (create an NVMeOF host with a file-backed ns)       [passed]
    runtime  2.850s  ...  2.827s
nvme/010 (run data verification fio job on NVMeOF block device-backed ns) [passed]
    runtime  28.148s  ...  26.239s
nvme/011 (run data verification fio job on NVMeOF file-backed ns) [passed]
    runtime  241.177s  ...  241.837s
nvme/012 (run mkfs and data verification fio job on NVMeOF block device-backed ns) [passed]
    runtime  40.502s  ...  37.633s
nvme/013 (run mkfs and data verification fio job on NVMeOF file-backed ns) [passed]
    runtime  191.061s  ...  192.911s
nvme/014 (flush a NVMeOF block device-backed ns)             [passed]
    runtime  23.068s  ...  22.672s
nvme/015 (unit test for NVMe flush for file backed ns)       [passed]
    runtime  23.341s  ...  22.319s
nvme/016 (create/delete many NVMeOF block device-backed ns and test discovery) [passed]
    runtime  14.842s  ...  14.733s
nvme/017 (create/delete many file-ns and test discovery)     [passed]
    runtime  14.820s  ...  14.774s
nvme/018 (unit test NVMe-oF out of range access on a file backend) [passed]
    runtime  2.783s  ...  2.790s
nvme/019 (test NVMe DSM Discard command on NVMeOF block-device ns) [passed]
    runtime  2.895s  ...  2.830s
nvme/020 (test NVMe DSM Discard command on NVMeOF file-backed ns) [passed]
    runtime  2.811s  ...  2.770s
nvme/021 (test NVMe list command on NVMeOF file-backed ns)   [passed]
    runtime  2.772s  ...  2.836s
nvme/022 (test NVMe reset command on NVMeOF file-backed ns)  [passed]
    runtime  3.407s  ...  3.431s
nvme/023 (test NVMe smart-log command on NVMeOF block-device ns) [passed]
    runtime  2.817s  ...  2.859s
nvme/024 (test NVMe smart-log command on NVMeOF file-backed ns) [passed]
    runtime  2.863s  ...  2.780s
nvme/025 (test NVMe effects-log command on NVMeOF file-backed ns) [passed]
    runtime  2.839s  ...  2.813s
nvme/026 (test NVMe ns-descs command on NVMeOF file-backed ns) [passed]
    runtime  2.793s  ...  2.794s
nvme/027 (test NVMe ns-rescan command on NVMeOF file-backed ns) [passed]
    runtime  2.815s  ...  2.799s
nvme/028 (test NVMe list-subsys command on NVMeOF file-backed ns) [passed]
    runtime  2.838s  ...  2.808s
nvme/029 (test userspace IO via nvme-cli read/write interface) [passed]
    runtime  3.092s  ...  3.075s
nvme/030 (ensure the discovery generation counter is updated appropriately) [passed]
    runtime  0.334s  ...  0.325s
nvme/031 (test deletion of NVMeOF controllers immediately after setup) [passed]
    runtime  17.295s  ...  17.435s

-- 
2.22.1




More information about the Linux-nvme mailing list