Commit Graph

1113 Commits

Author SHA1 Message Date
Tomasz Zawadzki
71a0db0e66 example/perf: add --use-every-core
This option overrides the current worker and ns
association logic with using every ns from each
worker.

This mimics the bdevperf -C option, and allows
to test scenarios in similar fashion.

Change-Id: Ie3734f86cd8fd1025bca5bd69e27b7316c2f3fbd
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14415
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-03-03 11:18:59 +00:00
Slawomir Ptak
d254a3b924 bdevperf: Random map for picking I/O offsets
Added a random map feature (-D command line option),
which enables offset tracking of every I/O
for random read, random write and random rw mix,
to make sure every offset is accessed the same
number of times.

Change-Id: I5a0a23718b9f0a94ca094f86175c036b3230fb8b
Signed-off-by: Slawomir Ptak <slawomir.ptak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16865
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-02-24 12:51:45 +00:00
Slawomir Ptak
652db802f1 bdevperf: Outstanding requests array size check
Change-Id: I7bbdff40b23c3d28ae9483690d427f3c4639b651
Signed-off-by: Slawomir Ptak <slawomir.ptak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16877
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-02-23 13:36:01 +00:00
Artur Paszkiewicz
a5d5ab27d1 examples/accel/perf: add support for xor
Change-Id: I0a9216945f5877af80d911b46f988a440e855fd4
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16395
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-02-21 08:33:18 +00:00
Ankit Kumar
cc7736c968 include/nvme_spec.h: add changes for fdp log pages
TP4146 added support for 4 new log pages.
These are FDP configurations, reclaim unit handle usage,
FDP statistics and FDP events.

Updated the identify example file accordingly.

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Change-Id: I5a20b728605257774d72bc184b50bc5008e142ea
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16518
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-02-15 10:37:56 +00:00
Ankit Kumar
1f600d381d include/nvme_spec.h: set and get features changes for fdp
TP4146 added support for 2 new set/get features.
Add changes for those (FDP and FDP events).

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Change-Id: I778da0a9aba9eca0c2d70b6b193494edf2e8bd43
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16519
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-02-15 10:37:56 +00:00
Ankit Kumar
4095963599 include/nvme_spec.h: update cdata and error status codes
1. Update cdata structure to indicate FDP support.
2. Add missing error status codes for base spec and
   the ones added by TP4146 (FDP).

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Change-Id: Id6f467d54a047e959ce3fc4d2197c23bf39ea059
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16517
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-02-15 10:37:56 +00:00
Ankit Kumar
7bbeb80a31 nvme: support 64 LBA formats for NVM and ZNS command set
Format LBA size (FLBAS) is updated to have:
Bit 3:0 as least significant 4 bits for format index
Bit 6:5 as most significant 2 bits for format index

NVMe format command fields are updated accordingly.

Add a new helper function to fetch the correct format index.
Update examples and unit test files accordingly.

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Change-Id: I2d6d9045b9d65ae91cb18843ca75b59cc27ed2f2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16515
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-02-15 10:37:56 +00:00
Jim Harris
0d11cf939b bdevperf: use rand_r() twice to get 64-bit values
rand_r() only returns up to RAND_MAX which is
INT32_MAX.  This means that on sufficiently large
bdevs, especially with smaller block sizes, bdevperf
may not be issuing I/O across the full range of the
bdev.

Found while investigating issue #2908.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I16db684a57a96f138e709008bded4471428944b6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16768
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-02-14 09:04:20 +00:00
Ankit Kumar
df45f11427 include/nvme_spec.h:update nsdata fields for NVM and ZNS command set
Updated the examples file as per the code changes.

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Change-Id: I63bd1aa94dbc2bec0a9ce837aa5efb48daa1fc1e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16514
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-02-13 18:40:20 +00:00
Konrad Sztyber
13d3123115 examples/abort: check process_completions()'s status
The abort app expects some requests to be failed (because they're
aborted), so a failed I/O doesn't cause the app to exit with a failed
status.  However, the qpairs should never be disconnected during the
test, so we should check their status to avoid hiding errors when that
happens.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I100cda8656ad748983695a434721424db84ea260
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16647
Reviewed-by: Michal Berger <michal.berger@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-02-13 13:50:15 +00:00
Konrad Sztyber
924a61bfa6 examples/abort: free qpairs at the end
It'll make it easier to handle errors in the following patch.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ic1a40ef59cff058d7926b3df4a966e5e6de9b0f7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16646
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-02-13 13:50:15 +00:00
Konrad Sztyber
9c04e6d832 examples/abort: check status of all workers
Previously, we only cared about the status of the main worker thread and
ignored errors from other threads.  This patch changes that and now
it'll return an error if any of the worker threads encountered an error.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Icc54b18a0bc4fae7a40e0a13846aa6ac01111c6f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16645
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-02-13 13:50:15 +00:00
Yifan Bian
f21a34ac26 perf: add io check for aio device
If no aio device exist, then we can use 'exit(1)' to exit. Also,
update the same error check with 'exit(1)' for io_uring path.

Fix issue with 2893

Signed-off-by: Yifan Bian <yifan.bian@intel.com>
Change-Id: Iade74fba4588b109ce77af76ac998bb05b842ef3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16652
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-02-09 11:31:58 +00:00
Shuhei Matsumoto
f5885db9ed bdev_fio_plugin: Replace spdk_bdev_first/next_leaf() by spdk_for_each_bdev_leaf()
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Icf7bd4348de200d33c242fa63f4facb9592abcaa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16538
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-01-31 10:30:52 +00:00
Shuhei Matsumoto
5647948681 bdevperf: Replace spdk_bdev_first/next_leaf() by spdk_for_each_bdev_leaf()
Replace all spdk_bdev_first/next_leaf() calls by spdk_for_each_bdev_leaf().

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I61e8302346a70b0dc219fff29b06158b542dd87f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16537
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-01-31 10:30:52 +00:00
Shuhei Matsumoto
9ef9d4bd23 bdevperf: Factor out creating multithread job config into helper function
The next patch will replace spdk_bdev_first/next_leaf() calls by
spdk_for_each_bdev(). As a preparation, factor out creating multithread
job config for a bdev into a helper function.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Ib4df53af8b1bba5b012e93ff9d00c4089cca774e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16536
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-01-31 10:30:52 +00:00
Jim Harris
dba35d8e44 nvme/perf: include config.h to get SPDK_CONFIG_URING
perf has support for io_uring when SPDK_CONFIG_URING
is set, but we have to include config.h to get it.

Fixes problem with perf -R option not working, even
when user specified --with-uring.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I403ae755349e702c39dba332c5fb335d171f0d02
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16584
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-01-30 16:29:35 +00:00
Jim Harris
c62637c9e7 perf: zero the ns_entry buffer for aio/uring
Otherwise we get garbage in ns_entry->zipf.  If
this is not-NULL, we use it for zipf random
distribution and segfault since it's not-NULL but
also not valid.

So use calloc instead.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I0d13e21989b6f43e9f6f16736479395d1d6f0e77
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16362
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-01-23 17:48:10 +00:00
paul luse
6afbf3db4d examples/accel_perf: Add buffer padding to compress buffer
Some data cannot be compresssed and if there is not room in
the output buffer for the uncompressed data and whatever
info the compress back end needs it will error out.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I4cb47e6cdb3facd3867d5dc4fb6f9352a307e33c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16098
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-01-19 11:16:01 +00:00
paul luse
91f3063b14 lib/accel: add output_size to decompress API
We had it for compress but simply didn't think of a use case for
decompress.  During the develpoment of the compressdev accel_fw
module it was discovered that compressdev does indeed provide the
uncompressed length on completion of decompress and the reducelib
uses it.  So, add it here.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I2f6a8bbbe3ef8ebe0b50d6434845f405afa7d37d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16035
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-01-19 11:16:01 +00:00
Shuhei Matsumoto
2085362d89 example/nvme_perf: Add an option for the RDMA SRQ size
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I227fb3ca61f1c8900aca1a5802bc1b7f32b96f3e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14913
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-01-17 23:53:01 +00:00
Hailiang Wang
cfd726a23f example/idxd_perf: Adjust the printing data spacing to make it beautiful
Like this:
IDXD_ChanID   Core      Transfers      Bandwidth     Failed     Miscompares
---------------------------------------------------------------------------
         0    0         7006937/s       13 MiB/s   35034688               0
===========================================================================
Total:                  7006937/s       13 MiB/s   35034688               0

Change-Id: I18b0538268ba56d79b77ca6659dc260ee115675c
Signed-off-by: Hailiang Wang <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16100
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-01-16 15:19:54 +00:00
Mike Gerdts
9e96e331c3 fio_plugin: initalize when create_serialize=0
When the fio plugin is used with reate_serialize set to false, fio calls
the init callback (spdk_fio_init()) before calling the setup callback
(spdk_fio_setup()). When create_serialize is true, spdk_fio_setup() is
called earlier.  Both spdk_fio_setup() and spdk_fio_init() call
functions that require that the SPDK libraries have been initialized.

While it is arguably a bug in SPDK that per-thread initialization
happens before global initialization, it is not terribly difficult to
work around in fio_plugin. The workaround implemented in this patch
splits the start of the plugin's init thread into its own function and
calls it from both spdk_fio_setup() and spdk_fio_init(). The init thread
is started while holding a mutex, and as before there is a guard to be
sure that the init thread is created only once.

Fixes issue #2843

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: I20d1863a88b75b416283f9466ee1186d8ef05063
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16053
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2023-01-11 09:17:16 +00:00
Mike Gerdts
9b754587c7 fio_plugin: bdev calls on spdk thread
This is a rework of commit 7722996dd2.

As the locks in bdev.c transition to spdk_spinlock, callers of
spdk_bdev_get_by_name() and any other function that uses an SPDK
spinlock needs to be executing from an spdk_thread.  This commit reverts
the earlier commit then fixes it with a different approach than was
previously used.

fio plugin functions that need to be on an SPDK thread into two parts:

1. fio API callback: transform args from fio into a spdk_fio_oat_ctx
   structure, then calls spdk_fio_sync_run_oat(). In the case of
   spdk_fio_setup(), the app thread is started in this part.
2. On App Thread (oat) callback: runs on the SPDK app thread via the
   poller spdk_init_thread_poll().

spdk_fio_sync_run_oat() sends a message to the app thread to have the
specified oat callback run. It wakees the poller loop via a condition
variable then waits for the oat callback to signal its completion via a
condition variable in the spdk_fio_oat_ctx.

Fixes issue #2818

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: I5c82542bb9e9e6b8823e9d1da293050bba336b65
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15866
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2023-01-11 09:17:16 +00:00
GangCao
60fd5c554d examples/bdevperf: check the successful status before dereferencing the pointer
Issue here is that the status could be negative due to NULL pointer and in the
callback, the status is not checked before dereferencing the pointer which is
NULL here.

Change-Id: I7240fa91d1a640556e1f27b8295921c7dd1fb57f
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16176
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Mellanox Build Bot
2023-01-10 13:11:18 +00:00
Krzysztof Karas
91b8f349fd hotplug: let device insertions/removals take priority
When running io_loop() let insertions and removals counters
take precedence before timeouts. This will let us determine
the cause of premature io_loop() exit in case of timeout.

Consider two scenarios:
First:
 1. Hotplug app records enough insertions/removals
 2. During "if (now > tsc_end)" check it also notices that
    it should terminate due to time constraint
 3. Hotplug exits using the timeout condition, because
    enough time has passed and no error is printed at
    this point.

Second:
 1. Hotplug app did not record enough insertions/removals
    during app runtime
 2. During "if (now > tsc_end)" check it also notices that
    it should terminate due to time constraint
 3. Hotplug exits using the timeout condition, because
    enough time has passed and no error is printed at
    this point.

After prioritizing the check on counters we avoid the first
scenario and timeout will be checked after the counters
were confirmed to be less than expected value, allowing us
to determine the cause of failure earlier.

Additionally added an errorlog to the body of the if checking
for timeout to signal this failure.

First part of the series fixing #2201.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I3f6f9c5c95e82e0a003419fcf181d858ffbd94dd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15964
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2023-01-09 11:16:50 +00:00
GangCao
0ab8393c60 examples/bdev/fio_plugin: add the RPC listen support
With this support, user could send the RPC commands to FIO
to query the IO statistics like output of below commands:

root@storage35:/spdk# ./scripts/iostat.py
cpu_stat:  user_stat  nice_stat  system_stat  iowait_stat  steal_stat  idle_stat
           3.18%      0.00%      0.35%        0.00%        0.00%       96.46%

Device   tps   KB_read/s  KB_wrtn/s  KB_dscd/s  KB_read  KB_wrtn      KB_dscd
TestPT   0.01  0.00       0.04       0.00       36.00    499608.00    0.00
Malloc1  0.61  0.00       2.42       0.00       36.00    31012820.00  0.00
Malloc3  0.01  0.00       0.04       0.00       36.00    499608.00    0.00

Change-Id: I694119313fb92cf9798c6897e61f788c2ac1f013
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15984
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2023-01-06 15:58:47 +00:00
GangCao
592fc6f410 examples/nvme_manage: check the valid address parse
Change-Id: I40daaae514902854c5d546388789e88248fe6869
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16078
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-01-05 23:26:02 +00:00
Michael Haeuptle
031ba90fe1 perf: Support setting IPv4 type of service (TOS)
New option --transport-tos to allow setting TOS value for RDMA transport.

Signed-off-by: Michael Haeuptle <michael.haeuptle@hpe.com>
Change-Id: I7747fac5c6641dfd18356314e8209bf5f3f35b7e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15909
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2023-01-05 19:54:53 +00:00
GangCao
ed4b89aaab examples/bdevperf: reset the performance period for next run
In the case of running by below commands:

./examples/bdev/bdevperf/bdevperf.py perform_tests

This value needs to be reset in each run, otherwise, it shows
wrong IOPS in the periodical way with -S parameter.

Change-Id: Ib8de7611aa06675d4a16fc3aa130d99b508b7605
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15960
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2022-12-21 09:34:12 +00:00
GangCao
f042d6bac4 examples/accel_perf: correct the unlock operation
Change-Id: I43e54ceae1184483747dff70d224a7aa2b24a6fd
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16006
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Community-CI: Mellanox Build Bot
2022-12-20 09:19:28 +00:00
GangCao
857e8cae85 examples/sock: close the right sock object
Change-Id: If26e4ace04e2ab6a950ebd270a46805ed8ca973d
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15956
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-12-16 09:26:11 +00:00
Alexey Marchuk
e58885f949 bdevperf: Limit queue depth for verify job with big IO
By design verify payload, uses a bit array to find
an offset of IO request. The bit array's size is
calculated as bdev_num_blocks / (io_size/block_size),
if bdev is small, queue depth requested by the user
might be bigger than the bit array size and in that
case bdevperf won't find a free bit for IO request
offset.

To fix that issue, limit queue_depth of such bdevs
by "size_in_ios" value

Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: I3117f5af7ae3ea18219c25982f33db936dd24c0b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15777
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2022-12-14 08:02:55 +00:00
Alexey Marchuk
893aaacccb bdevperf: Check current_queue_depth when job starts draining
During debug of some issue, it was found that
current_queue_depth might be 0 when job timer expires,
in that case we won't trigger the job end flow and
bdevperf may hang.

Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: Ia49ce6905d329f3ef40216c277bf095782ac9b2d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15776
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-12-14 08:02:55 +00:00
Michal Berger
483d34ad03 bdev/bdevperf: Fix spdk_bdev_channel_get_histogram() arguments
Don't pass bdev argument as it was completely removed from the
function via:

https://review.spdk.io/gerrit/c/spdk/spdk/+/15837

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Icbc1265a516e9fd21820b2f433ced4d4522b46b9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15893
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-12-13 11:51:25 +00:00
GangCao
5ba9f929a6 examples/nvmf: explicitly set the initial value for local variables
Change-Id: Id1638718328d911a4d19aeb00ae9a0d7c650262e
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15872
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: wanghailiang <hailiangx.e.wang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-12-13 09:26:18 +00:00
Richael Zhuang
045c781d47 bdevperf: use SPDK_SEC_TO_USEC for unit conversion
Use SPDK_SEC_TO_USEC instead of '1000 * 1000' or '1000000' for
unit conversion.

Change-Id: Ie9fb016b51ef3346ec640297941408f6c643b9b8
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15784
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-12-13 09:24:53 +00:00
Richael Zhuang
723dd06eb8 bdevperf: support latency info in bdevperf output
Get latency info from bdev histogram and print latency info in
bdevperf output.
print min/max/average latency info by default;
print summarized histogram info if run bdevperf with '-l';
print detailed histogram info if run bdevperf with '-ll'.

Change-Id: I3261574a12c038acde81a58727e9942c0f8c57b2
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14640
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-12-13 09:24:53 +00:00
Michal Berger
3f912cf0e9 misc: Fix spelling mistakes
Found with misspell-fixer.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: If062df0189d92e4fb2da3f055fb981909780dc04
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15207
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-12-09 08:16:18 +00:00
wanghailiangx
95fd6cb455 example/nvme: Adjust logic lines about if (current_queue_depth > 0)
The original code is logically correct because
spdk_nvme_qpair_process_completions() may decrease
ns_ctx->current_queue_depth. But I still recommend doing
an optimization so users can easily understand the code.
Prioritize code cleanup more than one additional polling.

Change-Id: I3613b1b4e294661fd35b7e5bebdb32e1c8352270
Signed-off-by: Hailiang Wang <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14332
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <qun.wan@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-12-07 08:42:55 +00:00
Mike Gerdts
7722996dd2 fio_plugin: spdk_bdev_get_by_name on spdk thread
As the locks in bdev.c transition to spdk_spinlock, callers of
spdk_bdev_get_by_name() and any other function that uses an SPDK
spinlock needs to be executing from an spdk_thread. This commit
initializes threads in the fio plugin in slightly different places to
accommodate this requirement.

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: I363ec544e58cb3540414305bc20e2d44bf225599
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15535
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-12-06 21:20:17 +00:00
Kozlowski Mateusz
2decb876cd examples/vmd: Add nvme library to VMD example apps
NVMe driver is necessary during spdk_vmd_init as vmd_init_end_device
won't find the nvme driver during spdk_pci_nvme_get_driver call,
resulting in segfault during spdk_pci_hook_device.

Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Change-Id: I8fc3396b467e34ec49e39075dca05eeb78f9c362
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15593
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-12-05 09:35:14 +00:00
Michal Berger
588dfe314b Add SPDX header to various files
They were missed by the initial set of patches which introduced this
header as a mandatory one across different types of files.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I3f9b37d41298c843e1648e72fe8593768ccd37e0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15423
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-11-29 08:27:51 +00:00
Ben Walker
27e85f520b accel_perf: Add compress and decompress support
Compression and decompression both start with an uncompressed file,
provided using the new -l command line option. The file is then
compressed in chunks according to the specified block size. Each
operation works on one chunk.

Change-Id: Ia7d3853627d938f73e6aa3ee09fccd11d9bca706
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Signed-off-by: Paul Luse <paul.e.luser@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14681
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-11-28 09:45:27 +00:00
GangCao
f43678c18e examples/perf: close the fd for URING or AIO
Change-Id: Ieb120ad2d0e4de965b85ce12ac421fe0906dada2
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15660
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: wanghailiang <hailiangx.e.wang@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2022-11-28 09:44:55 +00:00
GangCao
ef9168dcaa examples/bdevperf: fix potential memory leak of allocated config
Change-Id: Idd9d9bec5df0fbb74bb1f2a8af61c408a150d1aa
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15536
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2022-11-23 08:22:53 +00:00
Jim Harris
081b190b5f bdevperf: call spdk_thread_exit on job threads
Note: we can only exit a job thread after all
jobs are done executing.  This is because some bdevs
like Ceph send messages to a main thread, so we need
to make sure a main thread doesn't exit before another
thread that is sending messages to it.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iaa51f13f3bc659f6eda7fcefff82c127e095ce29
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15516
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: wanghailiang <hailiangx.e.wang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2022-11-23 08:22:04 +00:00
Jim Harris
dcb296a32b bdevperf: add bdevperf_job_free() function
Introduce a helper function to properly free everything
associated with a job structure, and then use that
in all of the various error paths to reduce the
number of changes required if/when new strings are
added to the job structure.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I05280371326ce9582e8452a7753a7990072f25b7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15506
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2022-11-23 08:22:04 +00:00
Jim Harris
7aa2cc29c0 bdevperf: simplify freeing of 'outstanding' bit array
spdk_bit_array_free(NULL) is fine, so we can avoid the
check.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I989797d5dce0339efb18a7e47e8d974d4ac5abf7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15505
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2022-11-23 08:22:04 +00:00