All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
To: linux-nvme@lists.infradead.org
Cc: hch@lst.de, sagi@grimberg.me,
	Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Subject: [PATCH 00/14] nvmet: remove repeated calls to nvmet_req_complete()
Date: Sun, 27 Jun 2021 22:08:03 -0700	[thread overview]
Message-ID: <20210628050817.19788-1-chaitanya.kulkarni@wdc.com> (raw)

Hi,

Since the addition of the NVMeOF target time, we've added various log
page and identify command handlers where we complete the request in
those handlers. This adds 10 repeated nvmet_req_complete() calls.

This patch series removes 10 repeated calls to the nvmet_req_complete()
in for various log page and identify command handlers by completing the
request in the nvmet_execute_get_log_page() and nvmet_execute_identify().
Also, with this change we prevent future repeatation of such calls.

This also allows us to remove 8 goto labels.

I've tested this code on nvme-5.14 [1], blktests and zonefs tests seems
to pass.

-ck

Chaitanya Kulkarni (14):
  nvmet: add common req complete for log page
  nvmet: remove repeated call for error log page
  nvmet: remove repeated call for smart log page
  nvmet: remove repeated call for fw slot log page
  nvmet: remove repeated call for changed-ns log page
  nvmet: remove repeated call for effects log page
  nvmet: remove repeated call for ana log page
  nvmet: add default case for nvmet_execute_identify
  nvmet: remove repeated call for id-ctrl
  nvmet: remove repeated call for id-ns
  nvmet: remove repeated call for nslist
  nvmet: remove repeated call for desclist
  nvmet: remove repeated call for id-cns-ns
  nvmet: remove repeated call for id-cns-ctrl

 drivers/nvme/target/admin-cmd.c | 180 +++++++++++++++++---------------
 drivers/nvme/target/nvmet.h     |  12 +--
 drivers/nvme/target/zns.c       |  27 ++---
 3 files changed, 108 insertions(+), 111 deletions(-)

# ./check nvme 
nvme/002 (create many subsystems and test discovery)         [passed]
    runtime  38.825s  ...  40.506s
nvme/003 (test if we're sending keep-alives to a discovery controller) [passed]
    runtime  10.176s  ...  10.184s
nvme/004 (test nvme and nvmet UUID NS descriptors)           [passed]
    runtime  1.781s  ...  1.776s
nvme/005 (reset local loopback target)                       [passed]
    runtime  2.334s  ...  2.243s
nvme/006 (create an NVMeOF target with a block device-backed ns) [passed]
    runtime  0.155s  ...  0.149s
nvme/007 (create an NVMeOF target with a file-backed ns)     [passed]
    runtime  0.102s  ...  0.104s
nvme/008 (create an NVMeOF host with a block device-backed ns) [passed]
    runtime  1.779s  ...  1.785s
nvme/009 (create an NVMeOF host with a file-backed ns)       [passed]
    runtime  1.747s  ...  1.755s
nvme/010 (run data verification fio job on NVMeOF block device-backed ns) [passed]
    runtime  34.091s  ...  26.953s
nvme/011 (run data verification fio job on NVMeOF file-backed ns) [passed]
    runtime  288.054s  ...  320.502s
nvme/012 (run mkfs and data verification fio job on NVMeOF block device-backed ns) [passed]
    runtime  8.515s  ...  9.634s
nvme/013 (run mkfs and data verification fio job on NVMeOF file-backed ns) [passed]
    runtime  27.329s  ...  24.710s
nvme/014 (flush a NVMeOF block device-backed ns)             [passed]
    runtime  20.028s  ...  21.024s
nvme/015 (unit test for NVMe flush for file backed ns)       [passed]
    runtime  20.615s  ...  21.140s
nvme/016 (create/delete many NVMeOF block device-backed ns and test discovery) [passed]
    runtime  20.653s  ...  21.571s
nvme/017 (create/delete many file-ns and test discovery)     [passed]
    runtime  20.402s  ...  22.023s
nvme/018 (unit test NVMe-oF out of range access on a file backend) [passed]
    runtime  1.747s  ...  1.767s
nvme/019 (test NVMe DSM Discard command on NVMeOF block-device ns) [passed]
    runtime  1.771s  ...  1.805s
nvme/020 (test NVMe DSM Discard command on NVMeOF file-backed ns) [passed]
    runtime  1.735s  ...  1.739s
nvme/021 (test NVMe list command on NVMeOF file-backed ns)   [passed]
    runtime  1.764s  ...  1.752s
nvme/022 (test NVMe reset command on NVMeOF file-backed ns)  [passed]
    runtime  2.163s  ...  2.182s
nvme/023 (test NVMe smart-log command on NVMeOF block-device ns) [passed]
    runtime  1.780s  ...  1.815s
nvme/024 (test NVMe smart-log command on NVMeOF file-backed ns) [passed]
    runtime  1.739s  ...  1.750s
nvme/025 (test NVMe effects-log command on NVMeOF file-backed ns) [passed]
    runtime  1.726s  ...  1.756s
nvme/026 (test NVMe ns-descs command on NVMeOF file-backed ns) [passed]
    runtime  1.740s  ...  1.750s
nvme/027 (test NVMe ns-rescan command on NVMeOF file-backed ns) [passed]
    runtime  1.735s  ...  1.757s
nvme/028 (test NVMe list-subsys command on NVMeOF file-backed ns) [passed]
    runtime  1.738s  ...  1.751s
nvme/029 (test userspace IO via nvme-cli read/write interface) [passed]
    runtime  2.213s  ...  2.253s
nvme/030 (ensure the discovery generation counter is updated appropriately) [passed]
    runtime  0.404s  ...  0.426s
nvme/031 (test deletion of NVMeOF controllers immediately after setup) [passed]
    runtime  6.396s  ...  6.226s
nvme/038 (test deletion of NVMeOF subsystem without enabling) [passed]
    runtime  0.061s  ...  0.058s

# ./zonefs-tests.sh /dev/nvme1n1 
Gathering information on /dev/nvme1n1...
zonefs-tests on /dev/nvme1n1:
  32 zones (0 conventional zones, 32 sequential zones)
  131072 512B sectors zone size (64 MiB)
  0 max open zones
Running tests
  Test 0010:  mkzonefs (options)                                   ... PASS
  Test 0011:  mkzonefs (force format)                              ... PASS
  Test 0012:  mkzonefs (invalid device)                            ... PASS
  Test 0013:  mkzonefs (super block zone state)                    ... PASS
  Test 0020:  mount (default)                                      ... PASS
  Test 0021:  mount (invalid device)                               ... PASS
  Test 0022:  mount (check mount directory sub-directories)        ... PASS
  Test 0023:  mount (options)                                      ... PASS
  Test 0030:  Number of files (default)                            ... PASS
  Test 0031:  Number of files (aggr_cnv)                           ... skip
  Test 0032:  Number of files using stat (default)                 ... PASS
  Test 0033:  Number of files using stat (aggr_cnv)                ... PASS
  Test 0034:  Number of blocks using stat (default)                ... PASS
  Test 0035:  Number of blocks using stat (aggr_cnv)               ... PASS
  Test 0040:  Files permissions (default)                          ... PASS
  Test 0041:  Files permissions (aggr_cnv)                         ... skip
  Test 0042:  Files permissions (set value)                        ... PASS
  Test 0043:  Files permissions (set value + aggr_cnv)             ... skip
  Test 0050:  Files owner (default)                                ... PASS
  Test 0051:  Files owner (aggr_cnv)                               ... skip
  Test 0052:  Files owner (set value)                              ... PASS
  Test 0053:  Files owner (set value + aggr_cnv)                   ... skip
  Test 0060:  Files size (default)                                 ... PASS
  Test 0061:  Files size (aggr_cnv)                                ... skip
  Test 0070:  Conventional file truncate                           ... skip
  Test 0071:  Conventional file truncate (aggr_cnv)                ... skip
  Test 0072:  Conventional file unlink                             ... skip
  Test 0073:  Conventional file unlink (aggr_cnv)                  ... skip
  Test 0074:  Conventional file random write                       ... skip
  Test 0075:  Conventional file random write (direct)              ... skip
  Test 0076:  Conventional file random write (aggr_cnv)            ... skip
  Test 0077:  Conventional file random write (aggr_cnv, direct)    ... skip
  Test 0078:  Conventional file mmap read/write                    ... skip
  Test 0079:  Conventional file mmap read/write (aggr_cnv)         ... skip
  Test 0080:  Sequential file truncate                             ... PASS
  Test 0081:  Sequential file unlink                               ... PASS
  Test 0082:  Sequential file buffered write IO                    ... PASS
  Test 0083:  Sequential file overwrite                            ... PASS
  Test 0084:  Sequential file unaligned write (sync IO)            ... PASS
  Test 0085:  Sequential file unaligned write (async IO)           ... PASS
  Test 0086:  Sequential file append (sync)                        ... PASS
  Test 0087:  Sequential file append (async)                       ... PASS
  Test 0088:  Sequential file random read                          ... PASS
  Test 0089:  Sequential file mmap read/write                      ... PASS
  Test 0090:  sequential file 4K synchronous write                 ... PASS
  Test 0091:  Sequential file large synchronous write              ... PASS

-- 
2.22.1


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

             reply	other threads:[~2021-06-28  5:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-28  5:08 Chaitanya Kulkarni [this message]
2021-06-28  5:08 ` [PATCH 01/14] nvmet: add common req complete for log page Chaitanya Kulkarni
2021-06-28  5:08 ` [PATCH 02/14] nvmet: remove repeated call for error " Chaitanya Kulkarni
2021-06-28  5:08 ` [PATCH 03/14] nvmet: remove repeated call for smart " Chaitanya Kulkarni
2021-06-28  5:08 ` [PATCH 04/14] nvmet: remove repeated call for fw slot " Chaitanya Kulkarni
2021-06-28  5:08 ` [PATCH 05/14] nvmet: remove repeated call for changed-ns " Chaitanya Kulkarni
2021-06-28  5:08 ` [PATCH 06/14] nvmet: remove repeated call for effects " Chaitanya Kulkarni
2021-06-28  5:08 ` [PATCH 07/14] nvmet: remove repeated call for ana " Chaitanya Kulkarni
2021-06-28  5:08 ` [PATCH 08/14] nvmet: add default case for nvmet_execute_identify Chaitanya Kulkarni
2021-06-28  5:08 ` [PATCH 09/14] nvmet: remove repeated call for id-ctrl Chaitanya Kulkarni
2021-06-28  5:08 ` [PATCH 10/14] nvmet: remove repeated call for id-ns Chaitanya Kulkarni
2021-06-28  5:08 ` [PATCH 11/14] nvmet: remove repeated call for nslist Chaitanya Kulkarni
2021-06-28  5:08 ` [PATCH 12/14] nvmet: remove repeated call for desclist Chaitanya Kulkarni
2021-06-28  5:08 ` [PATCH 13/14] nvmet: remove repeated call for id-cns-ns Chaitanya Kulkarni
2021-06-28  5:08 ` [PATCH 14/14] nvmet: remove repeated call for id-cns-ctrl Chaitanya Kulkarni
2021-07-16  7:36 ` [PATCH 00/14] nvmet: remove repeated calls to nvmet_req_complete() Christoph Hellwig

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=20210628050817.19788-1-chaitanya.kulkarni@wdc.com \
    --to=chaitanya.kulkarni@wdc.com \
    --cc=hch@lst.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.