numam-spdk/test/nvme/overhead
Shuhei Matsumoto 938d2ae254 test/nvme: Use spdk_nvme_detach_async() and spdk_nvme_detach_poll_async()
Use spdk_nvme_detach_async() and spdk_nvme_detach_poll_async() with
a local variable detach_ctx to detach multiple controllers.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I77cdc07ddfcd97569e31eeb245cd4e5a26289dbd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4441
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-20 16:55:55 +00:00
..
.gitignore test: move lib/nvme up one directory 2018-03-27 00:46:52 -04:00
Makefile test/app_overhead: fix aio make issue 2020-10-07 07:47:41 +00:00
overhead.c test/nvme: Use spdk_nvme_detach_async() and spdk_nvme_detach_poll_async() 2020-10-20 16:55:55 +00:00
README test: move lib/nvme up one directory 2018-03-27 00:46:52 -04:00

This application measures the software overhead of I/O submission
and completion for both the SPDK NVMe driver and an AIO file handle.
It runs a random read, queue depth = 1 workload to a single device,
and captures TSC as follows:

* Submission: capture TSC before and after the I/O submission
  call (SPDK or AIO).
* Completion: capture TSC before and after the I/O completion
  check.  Only record the TSC delta if the I/O completion check
  resulted in a completed I/O.  Also use heuristics in the AIO
  case to account for time spent in interrupt handling outside
  of the actual I/O completion check.

Usage:

To test software overhead for a 4KB I/O over a 10 second period:

SPDK:  overhead -s 4096 -t 10
AIO:   overhead -s 4096 -t 10 /dev/nvme0n1

Note that for the SPDK case, it will only use the first namespace
on the first controller found by SPDK.  If a different namespace is
desired, attach controllers individually to the kernel NVMe driver
to ensure they will not be enumerated by SPDK.