public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <kch@nvidia.com>
To: <linux-nvme@lists.infradead.org>
Cc: <kbusch@kernel.org>, <hch@lst.de>, <sagi@grimberg.me>,
	Chaitanya Kulkarni <kch@nvidia.com>
Subject: [PATCH 0/7] nvmet: use centralize req completion for log
Date: Thu, 23 Mar 2023 00:51:56 -0700	[thread overview]
Message-ID: <20230323075203.824096-1-kch@nvidia.com> (raw)

Hi,

There is a repeated call for nvmet_req_complete() in :-
nvmet_execute_get_log_page_error()
nvmet_execute_get_log_page_smart()
nvmet_execute_get_log_page_noop()
nvmet_execute_get_log_changed_ns(),
nvmet_execute_get_log_cmd_effects_ns() 
nvmet_execute_get_log_page_ana()

Instead of repeating the call in the current log pages (6) use
the nvmet_req_completion() call in the caller function
nvmet_execute_get_log_page().

Note that this is not the new pattern it is similar to what we have done
it for nvmet_set_features(), nvmet_get_features() and their respective
feature handlers.

This series is passing basic get-log page and blktests as below.

I've one more series in this area, please wait for any other cleanup
in this area.

-ck

Chaitanya Kulkarni (7):
  nvmet: prep to callers req completion for log
  nvmet: centralize req completion for err log
  nvmet: centralize req completion for smart log
  nvmet: centralize req completion for noop log
  nvmet: centralize req completion for change ns
  nvmet: centralize req completion for effects log
  nvmet: centralize req completion for ana log

 drivers/nvme/target/admin-cmd.c | 73 ++++++++++++++++++---------------
 1 file changed, 39 insertions(+), 34 deletions(-)

1. Manual execution of the log pages err, smart, fw-log,
   changed-ns, effects-ns, ana :- 
[16817.567503] nvmet: creating nvm controller 1 for subsystem testnqn for NQN nqn.2014-08.org.nvmexpress:uuid:e78b2b4f-b1dc-4266-95ea-854fcec1738b.
[16817.567608] nvmet: nvmet_execute_get_log_cmd_effects_ns 203
[16817.567611] nvmet: nvmet_execute_get_log_cmd_effects_ns 228
[16817.567621] nvmet: nvmet_execute_get_log_page_ana 290
[16817.567625] nvmet: nvmet_execute_get_log_page_ana 322
[16817.567632] nvmet: nvmet_execute_get_log_page_smart 142
[16817.567638] nvmet: nvmet_execute_get_log_page_smart 165
[16817.567666] nvme nvme1: creating 48 I/O queues.
[16817.571704] nvme nvme1: new ctrl: "testnqn"
nvme (nvme-6.4) # echo 0 > /sys/kernel/config/nvmet/subsystems/testnqn/namespaces/1/enable 
nvme (nvme-6.4) # echo 1 > /sys/kernel/config/nvmet/subsystems/testnqn/namespaces/1/enable 
nvme (nvme-6.4) # nvme fw-log /dev/nvme1n1 
Firmware Log for device:nvme1n1
afi  : 0
nvme (nvme-6.4) # echo $?
0
nvme (nvme-6.4) # nvme error-log /dev/nvme1n1 > /dev/null 
nvme (nvme-6.4) # echo $?
0
nvme (nvme-6.4) # dmesg  -c 
[16832.390334] nvme nvme1: rescanning namespaces.
[16832.390346] nvmet: nvmet_execute_get_log_changed_ns 238
[16832.390351] nvmet: nvmet_execute_get_log_changed_ns 254
[16836.279322] nvme nvme1: rescanning namespaces.
[16836.279350] nvmet: nvmet_execute_get_log_changed_ns 238
[16836.279355] nvmet: nvmet_execute_get_log_changed_ns 254
[16849.107716] nvmet: nvmet_execute_get_log_page_noop 45
[16859.728750] nvmet: nvmet_execute_get_log_page_error 51
[16859.728763] nvmet: nvmet_execute_get_log_page_error 73

2. 
blktests (master) # ./check nvme
nvme/002 (create many subsystems and test discovery)         [passed]
    runtime    ...  20.017s
nvme/003 (test if we're sending keep-alives to a discovery controller) [passed]
    runtime  10.083s  ...  10.110s
nvme/004 (test nvme and nvmet UUID NS descriptors)           [passed]
    runtime  1.450s  ...  1.434s
nvme/005 (reset local loopback target)                       [passed]
    runtime  1.794s  ...  1.776s
nvme/006 (create an NVMeOF target with a block device-backed ns) [passed]
    runtime  0.070s  ...  0.067s
nvme/007 (create an NVMeOF target with a file-backed ns)     [passed]
    runtime  0.028s  ...  0.028s
nvme/008 (create an NVMeOF host with a block device-backed ns) [passed]
    runtime  1.469s  ...  1.480s
nvme/009 (create an NVMeOF host with a file-backed ns)       [passed]
    runtime  1.452s  ...  1.497s
nvme/010 (run data verification fio job on NVMeOF block device-backed ns) [passed]
    runtime  86.116s  ...  85.324s
nvme/011 (run data verification fio job on NVMeOF file-backed ns) [passed]
    runtime  70.376s  ...  78.223s
nvme/012 (run mkfs and data verification fio job on NVMeOF block device-backed ns) [passed]
    runtime  73.964s  ...  73.261s
nvme/013 (run mkfs and data verification fio job on NVMeOF file-backed ns) [passed]
    runtime  67.237s  ...  67.202s
nvme/014 (flush a NVMeOF block device-backed ns)             [passed]
    runtime  4.229s  ...  4.178s
nvme/015 (unit test for NVMe flush for file backed ns)       [passed]
    runtime  3.749s  ...  3.711s
nvme/016 (create/delete many NVMeOF block device-backed ns and test discovery) [passed]
    runtime  13.430s  ...  13.294s
nvme/017 (create/delete many file-ns and test discovery)     [passed]
    runtime  13.388s  ...  13.481s
nvme/018 (unit test NVMe-oF out of range access on a file backend) [passed]
    runtime  1.434s  ...  1.434s
nvme/019 (test NVMe DSM Discard command on NVMeOF block-device ns) [passed]
    runtime  1.446s  ...  1.455s
nvme/020 (test NVMe DSM Discard command on NVMeOF file-backed ns) [passed]
    runtime  1.429s  ...  1.419s
nvme/021 (test NVMe list command on NVMeOF file-backed ns)   [passed]
    runtime  1.428s  ...  1.446s
nvme/022 (test NVMe reset command on NVMeOF file-backed ns)  [passed]
    runtime  1.790s  ...  1.762s
nvme/023 (test NVMe smart-log command on NVMeOF block-device ns) [passed]
    runtime  1.468s  ...  1.445s
nvme/024 (test NVMe smart-log command on NVMeOF file-backed ns) [passed]
    runtime  1.433s  ...  1.438s
nvme/025 (test NVMe effects-log command on NVMeOF file-backed ns) [passed]
    runtime  1.411s  ...  1.423s
nvme/026 (test NVMe ns-descs command on NVMeOF file-backed ns) [passed]
    runtime  1.424s  ...  1.428s
nvme/027 (test NVMe ns-rescan command on NVMeOF file-backed ns) [passed]
    runtime  1.476s  ...  1.426s
nvme/028 (test NVMe list-subsys command on NVMeOF file-backed ns) [passed]
    runtime  1.427s  ...  1.425s
nvme/029 (test userspace IO via nvme-cli read/write interface) [passed]
    runtime  1.550s  ...  1.568s
nvme/030 (ensure the discovery generation counter is updated appropriately) [passed]
    runtime  0.225s  ...  0.222s
nvme/031 (test deletion of NVMeOF controllers immediately after setup) [passed]
    runtime  4.058s  ...  3.986s
nvme/038 (test deletion of NVMeOF subsystem without enabling) [passed]
    runtime  0.012s  ...  0.011s
nvme/040 (test nvme fabrics controller reset/disconnect operation during I/O) [passed]
    runtime  8.056s  ...  7.861s
nvme/041 (Create authenticated connections)                  [passed]
    runtime  0.713s  ...  0.711s
nvme/042 (Test dhchap key types for authenticated connections) [passed]
    runtime  4.688s  ...  4.685s
nvme/043 (Test hash and DH group variations for authenticated connections) [passed]
    runtime  3.203s  ...  3.147s
nvme/044 (Test bi-directional authentication)                [passed]
    runtime  1.657s  ...  1.712s
nvme/045 (Test re-authentication)                            [passed]
    runtime  3.953s  ...  3.980s
blktests (master) # nvme_trtype=tcp ./check nvme
nvme/002 (create many subsystems and test discovery)         [not run]
    runtime  20.017s  ...  
    nvme_trtype=tcp is not supported in this test
nvme/003 (test if we're sending keep-alives to a discovery controller) [passed]
    runtime  10.110s  ...  10.123s
nvme/004 (test nvme and nvmet UUID NS descriptors)           [passed]
    runtime  1.434s  ...  1.138s
nvme/005 (reset local loopback target)                       [passed]
    runtime  1.776s  ...  1.202s
nvme/006 (create an NVMeOF target with a block device-backed ns) [passed]
    runtime  0.067s  ...  0.064s
nvme/007 (create an NVMeOF target with a file-backed ns)     [passed]
    runtime  0.028s  ...  0.038s
nvme/008 (create an NVMeOF host with a block device-backed ns) [passed]
    runtime  1.480s  ...  1.154s
nvme/009 (create an NVMeOF host with a file-backed ns)       [passed]
    runtime  1.497s  ...  1.129s
nvme/010 (run data verification fio job on NVMeOF block device-backed ns) [passed]
    runtime  85.324s  ...  90.112s
nvme/011 (run data verification fio job on NVMeOF file-backed ns) [passed]
    runtime  78.223s  ...  79.330s
nvme/012 (run mkfs and data verification fio job on NVMeOF block device-backed ns) [passed]
    runtime  73.261s  ...  77.092s
nvme/013 (run mkfs and data verification fio job on NVMeOF file-backed ns) [passed]
    runtime  67.202s  ...  63.555s
nvme/014 (flush a NVMeOF block device-backed ns)             [passed]
    runtime  4.178s  ...  3.822s
nvme/015 (unit test for NVMe flush for file backed ns)       [passed]
    runtime  3.711s  ...  3.433s
nvme/016 (create/delete many NVMeOF block device-backed ns and test discovery) [not run]
    runtime  13.294s  ...  
    nvme_trtype=tcp is not supported in this test
nvme/017 (create/delete many file-ns and test discovery)     [not run]
    runtime  13.481s  ...  
    nvme_trtype=tcp is not supported in this test
nvme/018 (unit test NVMe-oF out of range access on a file backend) [passed]
    runtime  1.434s  ...  1.119s
nvme/019 (test NVMe DSM Discard command on NVMeOF block-device ns) [passed]
    runtime  1.455s  ...  1.139s
nvme/020 (test NVMe DSM Discard command on NVMeOF file-backed ns) [passed]
    runtime  1.419s  ...  1.115s
nvme/021 (test NVMe list command on NVMeOF file-backed ns)   [passed]
    runtime  1.446s  ...  1.117s
nvme/022 (test NVMe reset command on NVMeOF file-backed ns)  [passed]
    runtime  1.762s  ...  1.160s
nvme/023 (test NVMe smart-log command on NVMeOF block-device ns) [passed]
    runtime  1.445s  ...  1.147s
nvme/024 (test NVMe smart-log command on NVMeOF file-backed ns) [passed]
    runtime  1.438s  ...  1.107s
nvme/025 (test NVMe effects-log command on NVMeOF file-backed ns) [passed]
    runtime  1.423s  ...  1.108s
nvme/026 (test NVMe ns-descs command on NVMeOF file-backed ns) [passed]
    runtime  1.428s  ...  1.113s
nvme/027 (test NVMe ns-rescan command on NVMeOF file-backed ns) [passed]
    runtime  1.426s  ...  1.122s
nvme/028 (test NVMe list-subsys command on NVMeOF file-backed ns) [passed]
    runtime  1.425s  ...  1.126s
nvme/029 (test userspace IO via nvme-cli read/write interface) [passed]
    runtime  1.568s  ...  1.258s
nvme/030 (ensure the discovery generation counter is updated appropriately) [passed]
    runtime  0.222s  ...  0.118s
nvme/031 (test deletion of NVMeOF controllers immediately after setup) [passed]
    runtime  3.986s  ...  0.820s
nvme/038 (test deletion of NVMeOF subsystem without enabling) [passed]
    runtime  0.011s  ...  0.014s
nvme/040 (test nvme fabrics controller reset/disconnect operation during I/O) [passed]
    runtime  7.861s  ...  7.334s
nvme/041 (Create authenticated connections)                  [passed]
    runtime  0.711s  ...  0.418s
nvme/042 (Test dhchap key types for authenticated connections) [passed]
    runtime  4.685s  ...  2.533s
nvme/043 (Test hash and DH group variations for authenticated connections) [passed]
    runtime  3.147s  ...  0.695s
nvme/044 (Test bi-directional authentication)                [passed]
    runtime  1.712s  ...  1.068s
nvme/045 (Test re-authentication)                            [passed]
    runtime  3.980s  ...  3.739s
blktests (master) # 


-- 
2.29.0



             reply	other threads:[~2023-03-23  7:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-23  7:51 Chaitanya Kulkarni [this message]
2023-03-23  7:51 ` [PATCH 1/7] nvmet: prep to callers req completion for log Chaitanya Kulkarni
2023-03-23  7:51 ` [PATCH 2/7] nvmet: centralize req completion for err log Chaitanya Kulkarni
2023-03-23  7:51 ` [PATCH 3/7] nvmet: centralize req completion for smart log Chaitanya Kulkarni
2023-03-23  7:52 ` [PATCH 4/7] nvmet: centralize req completion for noop log Chaitanya Kulkarni
2023-03-23  7:52 ` [PATCH 5/7] nvmet: centralize req completion for change ns Chaitanya Kulkarni
2023-03-23  7:52 ` [PATCH 6/7] nvmet: centralize req completion for effects log Chaitanya Kulkarni
2023-03-23  7:52 ` [PATCH 7/7] nvmet: centralize req completion for ana log Chaitanya Kulkarni
2023-03-23  8:34 ` [PATCH 0/7] nvmet: use centralize req completion for log Sagi Grimberg
2023-03-28  0:59 ` Christoph Hellwig
2023-03-28  5:18   ` Chaitanya Kulkarni

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=20230323075203.824096-1-kch@nvidia.com \
    --to=kch@nvidia.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=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