Commit Graph

307 Commits

Author SHA1 Message Date
Dariusz Stojaczyk
ec3c0bb2f0 Revert "fio_plugin: allow stopping poller after it's thread has been stopped"
Now that there's a fio_thread
at the time of calling spdk_bdev_finish,
this work-around is no longer
necessary.

This reverts commit ae0f518e4f.

Change-Id: I416ff69552ab863b6722931c9ef086f119439ba5
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/386248
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-11-14 12:30:26 -05:00
Dariusz Stojaczyk
a658245f40 fio_plugin: add persistent fio_thread for spdk init/finish
This patch also replaces "temporary"
SPDK threads for init/finish with a
single persistent thread that's created
at the time of init, and destroyed
at the time of finish.

Change-Id: I6da922cb50f06a9c31e22817d06c5dcbf19255b6
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/386247
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-11-14 12:30:26 -05:00
Dariusz Stojaczyk
8865e0bf51 fio_plugin: poll all remaining events on thread shutdown
There were unprocessed events in the event ring at the time
of destroying it's thread.

Polling until *done* flag is set is not sufficient. Since a single
fio_getevents call will poll only a single message, any
message positioned after the callback that sets the *done*
flag would not be processed.

Change-Id: I8fee384cb980373672bed4bc498f75774aa64a9e
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/385802
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-11-14 12:30:26 -05:00
Dariusz Stojaczyk
4314d72505 fio_plugin: add spdk_fio_poll_thread
Separated SPDK-related code
from the FIO callback spdk_fio_getevents.
This is required for upcoming patches.

Change-Id: I8d30a3f910f29b13344df91fbbff51e00dfa0a0a
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/386102
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-11-14 12:30:26 -05:00
Daniel Verkamp
b3781b227b blobcli: add bstype to blobstore info
Change-Id: Ib4fe119d42db943fd5b7f52836358a01cb4bc03f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/383639
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-10-29 16:06:29 -04:00
Tomasz Zawadzki
11104c1c85 fio_plugin: add back bdev and copy engine finish
During SPDK asynchronous finish cleaning up of bdev and
copy engine was removed. Now it is added back taking
into account asynchronous nature of those two calls.

Only when spdk environment was initialized, on fio_exit
SPDK environment is cleaned up. Similar to init path,
this is done in temporary SPDK thread.

When in here, fixed fio_thread->iocq memleak.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I4558af4539dd2617d17aeda9b568b697ea54ff44
Reviewed-on: https://review.gerrithub.io/383731
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-10-27 13:03:55 -04:00
Tomasz Zawadzki
6c54c13cd4 event/subsystem/bdev: asynchronous SPDK finish
First this change moves spdk_subsystem_fini() to trigger on
spdk_app_stop(). This ensures that spdk_subsystem_fini() is called
before reactors are stopped in spdk_reactors_stop().

Finish paths for subsystems, bdevs and copy engine is now
asynchronous.
Each of those three mentioned have to make sure they are
asynchronous as well.

Only bdev that currently has requirement for asynchronous finish
are logical volume.
Thus the change in vbdev_lvol.c making it move to next bdev module
only after all lvol stores were unloaded.

Fio_plugin finish of bdev and copy_engine was removed for now.
Next patch in series adds it back with async support.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I80ee2d084f3d82c50bf1329e08996604ae61b1b3
Reviewed-on: https://review.gerrithub.io/381536
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-10-27 13:03:55 -04:00
Liang Yan
32b35d9958 nvme/perf: check if aio files exist while no NVMe controller found
Change-Id: I9ced263535e8cd9c9503a208a77832140833c9d3
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-on: https://review.gerrithub.io/383952
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-10-26 15:41:50 -04:00
Daniel Verkamp
ee5c4f6f0b blobcli: fix README.md code block formatting
Change-Id: I4bc9c0246158eeccfd819089aff095798be1f786
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/383501
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-10-23 19:20:44 -04:00
Paul Luse
5589fc4a6a blobcli: fix two issues caught by klocwork
an off by one error and a bounds checking addition

Change-Id: Ifad5ec4b5e358d69d35e06a7902d5593c4b7fb86
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/383296
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-10-20 17:07:48 -04:00
Paul Luse
cfa4cae06d blobcli: require option for block device name
Used to be hardcoded, now is a required cmd line parm that
needs to be provided regardless of mode.

Change-Id: Ieac9ce309172a50ccfd27effde5a5846f9bfec17
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/383031
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-10-19 19:01:46 -04:00
Paul Luse
98a2ec3e5a blobcli: minor fixes
- fixed issue with token parsing where only a space was desired
and some other junk ended up in there that would cause issues
with parsing filenames because of the .
- made s few fatal error exits consistent

Change-Id: Ib7fa07416881df42db88db7d94542963e492ca9b
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/382911
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-10-19 19:01:46 -04:00
Paul Luse
cf0d773601 blobcli: refactor cmd_parser()
Moved the checking of additional args to within the switch
statement and replaced hardcoded index values with optind
to make their position relative to the switch as opposed
to the full command list.  There are also some minor fixes
in here wrt the cmd_chosen value to fix issues with the
3 modes and how they handle the case when there are issues
with the cmd line.

Change-Id: Ic5d547298adec658fd572b9b35d72f588b843113
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/382910
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-10-19 19:01:46 -04:00
Paul Luse
809dc4187e blobcli: fixup error handling in dump_imp_open_cb()
Change-Id: Ia7feebd39a023642b94bedbab4da8f3b2f09b245
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/382904
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-10-19 19:01:46 -04:00
Paul Luse
e9a50eb8cc blobcli: update some print messages to provide more info
Change-Id: Iaeeff8216784e8f09dc172d6d258c057dc1db37d
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/382903
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-10-19 19:01:46 -04:00
Paul Luse
d4e565b41b blobcli: fix bugs where freed memory is not NULL
There are a few places where we check for a NULL * to make
decisions and in both shell and script modes, any command
sequence loads and unloads the bs (self contained) so when
multiple actions are taken and some value that was freed
isn't NULL we can end up with segfaults.

Change-Id: I595797266b4a25dd8bc83fdaf68cb50c11bc958b
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/382902
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-10-19 19:01:46 -04:00
Paul Luse
cbe9216ee4 blobcli: fix incorrect error message
If a config file is specified an error message would incorrectly
print.

Change-Id: I532762f6e6ed26bd213255b0e67663035fc1620e
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/382876
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-10-19 19:01:46 -04:00
Paul Luse
e5044f7930 blobcli: add script mode and readme
The readme explains how this mode works and includes a sample
test script that was used to test this mode.

Change-Id: I501b08004cc68157fe767ce8db61bf05f2eee391
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/380891
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-10-19 19:01:46 -04:00
Daniel Verkamp
8eef5183d3 bdev: remove spdk_bdev_poller_start() lcore option
Always start bdev pollers on the calling core.

This removes the lcore concept from the bdev poller abstraction and
simplifies the job of spdk_bdev_initialize() callers providing their own
poller and event implementations.

All callers except the NVMe bdev hotplug poller already used the current
core as the parameter.  The NVMe HotplugPollCore option was undocumented
and unused in any of the tests or example configuration files, so it
should be safe to remove.

Change-Id: I93b466e1e58901b8785c40cbe296fa46c157850f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/382857
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-10-18 20:28:29 -04:00
Dariusz Stojaczyk
ae0f518e4f fio_plugin: allow stopping poller after it's thread has been stopped
Patch 2b37c71 [1] introduced the
spdk_bdev_finish() call on the
fio_plugin shutdown. That happens
after all the fio threads have
stopped. Patch 19ddb10 [2] introduces
an extra poller that has to be
stopped during spdk_bdev_finish().
Prior to this patch fio_plugin
pollers couldn't be stopped if their
corresponding threads have been
already stopped - but that's a
behavior we want.

[1] 2b37c71 ("bdev/fio_plugin: add call spdk_bdev_finish")
[2] 19ddb10 ("bdev_virtio: implement controlq and RESETs")

Change-Id: I415d6f8a564ddd70a4e50f149e85f2765f036b4d
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/383018
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-10-18 18:49:15 -04:00
Paul Luse
866f15b3ac blobcli: refactoring and cleanup
Some refactoring around functions that need to load the
blobstore as a first step was done as general cleanup. Function names
were also updated for consistency, some comments cleaned up
and #defines added for clarity.

Change-Id: I71550b6664a8ec78aca1b304891de3f6154b616d
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/380834
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-10-18 12:46:06 -04:00
Paul Luse
c5e63c71ff blobcli: add interactive shell mode
All of the same commands and options are available but by
starting with the -S option the user enters an interactive
shell mode to interact with blobstore significantly
improving response time by only having to init DPDK and NVMe
subsystems one time.

Change-Id: Ib927ba0848166dba1090484cecbbcf011122b714
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/380833
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-10-18 12:46:06 -04:00
Ziye Yang
2b37c71be1 bdev/fio_plugin: add call spdk_bdev_finish
Since we do not call spdk_app_start, so we do not
use SPDK's subsystem mechanism, so we need to
cal spdk_bdev_finish by ourselves in this fio plugin

Change-Id: Idd1063482ab1a99880c88c1b092961ff3419f60c
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/382613
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-10-18 12:40:47 -04:00
Daniel Verkamp
69a0f437db examples/nvme/hotplug: free task on error path
If the spdk_dma_zmalloc() call for the task buffer fails, we should free
the task before returning an error.

Change-Id: Icf70826dfc7f921d2a18f340480ea7c2ac3df3f4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/382851
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-10-17 15:21:39 -04:00
Maciej Szwed
eb8b1e20a9 blobstore: add bstype to blobstore super block
Introducing bstype as a way to identify and verify
 blobstore type.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I50267b5408625be10fe0c146ae329016d5509b4a
Reviewed-on: https://review.gerrithub.io/380476
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-10-17 13:36:03 -04:00
Daniel Verkamp
0722434074 nvme/identify: print discovery log contents
Now that we can connect directly to a discovery service via
spdk_nvme_connect(), it is useful to have the ability to dump its
discovery log page in the identify example.

Change-Id: Ie32f7ae2f0725874fed56258aa3c07d619fce0dd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/382208
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-10-12 16:39:55 -04:00
GangCao
13d4f08480 nvme/example: add the call to spdk_nvme_connect()
In this identify example, added a call to the newly introduced
public spdk_nvme_connect() API so that other related change can
refer to this one as an example.

Change-Id: Iba97b6e52810a66d4c781bb563985e84ffb86708
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/382070
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-10-11 13:58:14 -04:00
Ziye Yang
36f9d416a1 fio_plugin: update the README
Describe the phenoemon for peformance difference
between fio + spdk plugin and spdk nvme perf
on multiple NVMe SSDs while both using single
cpu core.

Change-Id: I80c2cfd51cd1d8ec28a11a1a8653469cfc3335eb
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/379573
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-10-10 16:45:00 -04:00
Dariusz Stojaczyk
b8f40516f0 test/bdev: add --spdk_mem param to fio_plugin
This is required for current virtio implementation,
as it supports only up to 8 hugepages.

Change-Id: I3e89a54188097987947de40f6dcdedc46285252f
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/380984
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-10-09 19:38:27 -04:00
Changpeng Liu
c5d8b108f2 examples/perf: use NVMe Maximum Queue Entries as the default queue size
For perf tests with large I/O size, the NVMe driver may split one
request to several entries based on stripe and maximum transfer size,
so take user's input of queue depth as default queue size of NVMe
queue pair is not accurate. Here the patch evaluate users' input
and report an error when queue entries more than hardware's limit.

Change-Id: I66922a3d673dc97796d7fbe6e86cf5037a45b37d
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/379969
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-09-29 18:45:47 -04:00
Daniel Verkamp
8acc4ae5da nvme: add controller option to specify host ID
A random host ID is generated per SPDK application startup if the user
doesn't specify a host ID during controller startup.

This also changes the default host NQN for NVMe-oF connections to a
random UUID NQN based on the host ID.

Change-Id: Ib0f70dd63e53087716842b412a1f134a9991d4da
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/380528
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2017-09-29 11:43:25 -04:00
Daniel Verkamp
b0c91df8e7 blobcli: fix formatting with astyle 3.0
Change-Id: Ib6052a9239cac14fdefc74eada39067f2b042672
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/380680
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-09-28 14:09:55 -04:00
Daniel Verkamp
e9cf3ecf14 blobcli: add hot remove callbacks
Commit 99ba2b25e6 ("lvol: hotremove support") added new parameters to
spdk_bdev_create_bs_dev(), but it was merged after the blob cli, which
didn't get updated to add the new parameters.

Just pass NULL as the hot remove callback for now (no hotplug support in
blobcli).

Change-Id: I1dea802062afb9fbd4f35f3c891357873570d58c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/380679
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-09-28 13:13:33 -04:00
Maciej Szwed
4338d3c9a7 blob_bdev: hotremove support
This is in preparation for enabling hot remove of logical volumes when
their underlying blobstore device is hot-removed.


Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I310a3f64f0de5d628609c20a1a3b4d38df0755aa
Reviewed-on: https://review.gerrithub.io/377041
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-28 12:46:18 -04:00
Paul Luse
8fbbfccdd5 app: blob cli
The CLI is intended to serve as both example code and a tool for
developers learning/kicking the tires of blobstore. Initial
functionality includes:

- initialize a blobstore
- list available bdevs or blobs
- create a new blob of a specific size
- set the superblob ID
- show detailed info for a blob
- show detailed info for the blobstore
- set/delete an xattr pair for a blob
- fill a blob with a value
- import a local file to a blob
- dump a blob to a local file

The CLI requires an NVMe backend and uses both the SPDK app
framework and the bdev layer.

Change-Id: I0a3cccef1ce0d51ce84dde2211cb07551c6e8b3a
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/373383
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-09-28 12:27:56 -04:00
Liang Yan
6bfff2f1cc examples/perf: exit perf tool if no controllers found
Change-Id: Ie70236f6be40ad9598969da2a462af44763c4ac4
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-on: https://review.gerrithub.io/379437
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-09-22 14:15:34 -04:00
Daniel Verkamp
93c803c363 nvme/identify: print error if no controllers found
Change-Id: I5b0411484290bbdf9077e55674ae368312fb01ab
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/378185
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2017-09-18 12:54:06 -04:00
Daniel Verkamp
b163dc0216 nvme/perf: replace DPDK uses with env abstractions
Fully port the remaining uses of rte_ functions from DPDK to the SPDK
env library abstraction layer.

This also simplifies buffer allocation: each task only needs to be
allocated once during the initial submit_io() call, rather than using a
mempool to get/put the task on every I/O.

Change-Id: I39c8caff81bbb1467101ba3b24a389c437075c61
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/378220
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2017-09-13 12:51:46 -04:00
Daniel Verkamp
455525f5a0 examples/nvme/hotplug: simplify buffer management
We don't need to allocate/free tasks on every I/O; we can just
allocate the tasks and buffers once in the initial submit_io() loop.

This also removes the remaining direct DPDK calls from the hotplug
example.

Change-Id: Ie8774b289e650b3fa64614f2da0efbefd013a610
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/376864
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-05 17:55:01 -04:00
Ziye Yang
a99dd7751f fio_plugin: Fix the performance issue on testing multiple remote nvme subsystem
The reason is that we create duplicated qpair on same subsystem many times,
thus the performance is influenced. And this patch can fix this issue.

Change-Id: I075b028b15e0d34857a89510710642f2d9520235
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/375782
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-08-31 19:08:49 -04:00
Ziye Yang
9e8853953a fio_plugin: Poll qpairs on the same thread in round-robin manner
With this change, the polling qpairs can be in round-robin manner.

Change-Id: I1926468dc596de2a43f42451525650356f44fbbd
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/375707
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-08-31 19:08:49 -04:00
Daniel Verkamp
e3971c41ea nvme_spec: update Identify Controller SGLS field
In NVMe 1.3, the Identify Controller data SGLS field's definition was
changed; in NVMe 1.2, the first bit simply indicated whether SGLs were
supported, but in NVMe 1.3, the first two bits now indicate whether SGLs
are supported and whether they require Dword-aligned data.

Change-Id: I9181055a86f52ad939b65eca5af66a400594a696
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/376027
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-08-29 15:05:09 -04:00
Daniel Verkamp
47182bd7c9 io_channel: allow user to provide a thread name
This moves the thread name setting code into the generic SPDK thread
setup code, so now all spdk_threads can be named, not just ones created
by the event framework.

Change-Id: I6c824cf4bcf12fe64a8e2fc7cdc2d6c949021e40
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/375220
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-08-29 13:11:08 -04:00
Dariusz Stojaczyk
2705f6f10d Fixed all SPDK_LOG() calls without newline char
Change-Id: Ib9a6b3e7584c5edd8f8c0f8cd20349d86651a5a2
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/374780
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-08-18 18:56:51 -04:00
Ben Walker
053d5733e6 env: Add a default value for mempool cache size
This is just a convenience and replaces the common practice
of passing -1.

Change-Id: Id96734307ebf52ef0ee7dba0e7ac89602b2b5b1a
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/374520
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-08-17 16:55:55 -04:00
Ben Walker
0d3a55b79e fio/bdev: Increase available queue depth for message passing
For malloc backends without IOAT a message gets queued up
for every completion. This can quickly run the message
passing ring out of entries. Increase it's size
substantially.

Change-Id: Ib09a0887d3d843a768156c9221a4f43c6cb43a4d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/374353
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-08-17 16:29:13 -04:00
Daniel Verkamp
a996b228d2 blob_hello: remove unnecessary cleanup NULL checks
hello_context is never NULL when hello_cleanup() is called, and
spdk_dma_free() does nothing if the parameter is NULL.

Change-Id: I7004d70a17e5dc237206b95c26df9b100952df65
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/374205
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-08-17 12:51:51 -04:00
Ben Walker
77bcc2454d bdev/fio_plugin: Add trim support
Change-Id: I4b046e63a669d52c875efffb5a91e99845fc623d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/370383
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-08-11 19:54:32 -04:00
Paul Luse
85af63a5f5 examples: blobstore hello world
Example hello world for blobstore that:

- uses the spdk app framework
- uses a malloc backend bdev
- shows the basic blobstore operations

Change-Id: I1662139e6b1fa33c6109006407a11c8c0936ac0c
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/370785
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-08-11 13:17:11 -04:00
Ben Walker
4b8e7d50c0 bdev: Add an example fio plugin
Change-Id: I5e0ebb8d452a41ad848b319af9bb978546807d5e
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/366495
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-08-04 20:03:37 -04:00