[PATCH V2 0/2] nvme: replace linked list with xarray for ns tracking

Chaitanya Kulkarni chaitanya.kulkarni at wdc.com
Tue Jun 30 22:25:15 EDT 2020


Hi,

This is a small patch-series which replaces ctrl->namespaces with
xarray for host-core and target-core. We can see following
performance improvement when running fio with 32 parallel jobs where
first 16 namespaces and last 16 namespaces are used for I/O. See [1] for
detailed performance numbers. 

Please consider this for nvme-5.9.

Regards,
Chaitanya

[1] XArray vs linked list performance comparision with NVMeOF nvme-loop
target with each namespace backed by unique null block device :-

Bandwidth ~16.4198% increase with Xarray :-
-----------------------------------------------------------------------

default-1.fio.log:  read:  IOPS=820k,  BW=3204MiB/s  (3360MB/s)(188GiB/60002msec)
default-2.fio.log:  read:  IOPS=835k,  BW=3260MiB/s  (3418MB/s)(191GiB/60002msec)
default-3.fio.log:  read:  IOPS=834k,  BW=3257MiB/s  (3415MB/s)(191GiB/60001msec)
xarray-1.fio.log:   read:  IOPS=966k,  BW=3772MiB/s  (3955MB/s)(221GiB/60003msec)
xarray-2.fio.log:   read:  IOPS=966k,  BW=3775MiB/s  (3958MB/s)(221GiB/60002msec)
xarray-3.fio.log:   read:  IOPS=965k,  BW=3769MiB/s  (3952MB/s)(221GiB/60002msec)

Latency ~25% decrease with Xarray :-
------------------------------------------------------------------------

default-1.fio.log:  slat  (usec):  min=8,  max=26066,  avg=25.18,  stdev=47.72
default-2.fio.log:  slat  (usec):  min=8,  max=907,    avg=20.24,  stdev=7.36
default-3.fio.log:  slat  (usec):  min=8,  max=723,    avg=20.21,  stdev=7.16
xarray-1.fio.log:   slat  (usec):  min=8,  max=639,    avg=14.84,  stdev=1.50
xarray-2.fio.log:   slat  (usec):  min=8,  max=840,    avg=14.84,  stdev=1.51
xarray-3.fio.log:   slat  (usec):  min=8,  max=2161,   avg=15.08,  stdev=9.56

CPU usage ~12.2807% decrease with Xarray :-
-----------------------------------------------------------------------

default-1.fio.log:  cpu  :  usr=3.92%,  sys=57.25%,  ctx=2159595,  majf=0,  minf=2807
default-2.fio.log:  cpu  :  usr=3.98%,  sys=57.99%,  ctx=1565139,  majf=0,  minf=2425
default-3.fio.log:  cpu  :  usr=3.99%,  sys=57.85%,  ctx=1563792,  majf=0,  minf=2977
xarray-1.fio.log:   cpu  :  usr=4.47%,  sys=50.88%,  ctx=1810927,  majf=0,  minf=2478
xarray-2.fio.log:   cpu  :  usr=4.47%,  sys=50.88%,  ctx=1812184,  majf=0,  minf=2176
xarray-3.fio.log:   cpu  :  usr=4.49%,  sys=50.86%,  ctx=1816963,  majf=0,  minf=2736

Change from V1:-

1. Use xarray instead of rcu locks.

Chaitanya Kulkarni (2):
  nvme-core: use xarray for ctrl ns tracking
  nvmet: use xarray for ctrl ns storing

 drivers/nvme/host/core.c        | 235 +++++++++++++++++++-------------
 drivers/nvme/host/multipath.c   |  15 +-
 drivers/nvme/host/nvme.h        |   5 +-
 drivers/nvme/target/admin-cmd.c |  25 ++--
 drivers/nvme/target/core.c      |  77 +++++------
 drivers/nvme/target/nvmet.h     |   3 +-
 6 files changed, 192 insertions(+), 168 deletions(-)

-- 
2.26.0




More information about the Linux-nvme mailing list