env_dpdk_get_mem_stats RPC has been requested to be
available in bdevperf.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I10aea634851e21018b223d7331b1bbeb7630a09c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3520
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Change the I/O timeout callback to abort the timeout I/O if g_abort
is set to true. Increase the task pool twice to submit abort task
in parallel.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1722f3c0ec8fc58a400b937895ad365cba7defbe
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2626
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
The following patches will abort the timeout I/O in bdevperf tool.
This is a preparation. Add CLI option to set timeout to detect
starved I/O and add count of timeout I/Os to stats.
spdk_bdev_set_timeout() disables timeout if timeout value is zero.
Hence we do not have to check if g_timeout_in_sec is not zero.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I201682acd321ecd414cfbfd9f5445bf3dc934b41
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2625
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This is convenient to evaluate I/O abort for read or write I/O
to the delay bdev.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Idceebb9d65938837a57629cc6ec8db6507582116
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2624
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This is a preparation to support I/O abort by bdevperf tool.
Add io_failed to bdevperf_job and increment it per I/O completion.
Then add io_failed to statistics.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I45c15d9644e5d66310fbbe62682015bd81074973
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2623
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Now, each bdevperf_job gets it's own bdevperf_thread. Scheduling the
jobs onto cores is left to the underlying event framework in the normal
case. In the multi-thread case, cpumasks are set on the jobs' threads to
ensure they're distributed appropriately.
Change-Id: I55f1a44b4262d715954b3a63bf00b8d2321fafca
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1512
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
None of these operations need to occur on the job's thread, so just do
them in a simpler loop on the master thread during shutdown.
Change-Id: I6fda3c4b37c206e9e1e43af9d1a49a2e83afcd67
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1872
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
We can collapse the two loops at exit time into one this way.
Change-Id: Iffe06e03c54fadc605e168580b69d2c710ac1168
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1849
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
This is going to be used in the shutdown path, so move it
up to avoid having to forward declare it.
Change-Id: Ia5e4d9ef4290f6d67528ee7d3f8a2e15bc39868d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1870
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
As we move to more complex job definitions, it will make more sense to
print the stats for each job separately, rather than grouping by
reactor.
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I1a94c36a5d272ae406b0b201dc05ec020ab651a0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1848
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
No reason to delay until the I/O submit function. Do it up front
and fail if it can't get one.
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I646bc68f8dd7207667e546f7be44464909fa2cc4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1511
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Make these two separate code paths so normal mode doesn't need
to do an spdk_for_each_channel and iterate every thread just
to get to the single thread it wants to build a job on.
Change-Id: Ibe57b3f3d4f990550ef4f5da93cb8ca54ae3ab85
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1510
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
We will be create fine name for each poller but it will need large
effort. Replacing spdk_poller_register by the macro SPDK_POLLER_REGISTER
will provide better name than function address with minimum effort.
Following patches may improve function name for clarification.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If862a274c5879065c3f7cb04dcb5ca7844523e68
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1781
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>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Community-CI: Broadcom CI
Keep it all in one place to make it easier to see.
Change-Id: I8c2cc1b5da8ce431d7b1b5546440324db169e09c
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1509
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Only called from one place.
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I34a9d29d4a45df08ecf168c12bd28e358ed6ff18
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1508
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
It's only called from one spot.
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I60ecc3c9763faed6d7f3dbc8de5bf63d478d70ec
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1506
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Only called one place.
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I8e8edf4e7a36a2e953b0856a1849e86dc015a5c3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1505
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This simplifies the initialization to only a single pass through all
cores.
Change-Id: I6fa8fec90d131f0fd9544ef8548daac52465691a
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1504
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This will make some refactoring later a bit clearer.
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Iae2c36d1c298377cd20cf3226b3b8dfe712484ff
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1503
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
fix#1: fix issue when setting outstanding bit array
In the case where spdk_bit_array_get() is false after selecting
an offset, we'd fail to set the outstanding bit in the array for
that location based as it was included inside of the conditional
that would have us try another. Switched the logic up to avoid
needing a second check on g_verify.
fix#2: fix offset_in_ios to be relative with the range of the job
offset_in_ios was absolute but size of bit map array was the
range of the job. The comment in the source file said it was
relative, but did not match the code.
Change offset_in_ios to be relative with the range of the
job and use it for spdk_bit_array_set, spdk_bit_array_get, and
spdk_bit_array_clear.
fix#3: fix bit was not cleared when submission failed
When bdevperf_submit_task() failed to submit, the corresponding
bit was not cleared from job->outstanding.
fix#4: fix bit was not cleared when submitted I/O failed.
bdevperf_complete() had cleared bit only if the I/O succeeded.
This bug is apparaent only when -C option is enabled.
fixes issue #1329
Signed-off-by: paul luse <paul.e.luse@intel.com>
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5b7e1d0b2e489b807906a94ed5d05da65067e6ab
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1736
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>
Still testing to do both basic functionality as well as use of
various combinations of options.
Instead of using LBA range locking to protect the threads from
each other, this solution assigns a specific LBA range per target.
The LBA ranges are based on how many threads are working on any
one target.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I6a6588506a43292969fffe1baf060148d6772ee5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1207
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Group the global parameters into the global structure
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I552b536869221efb58bc30820b7adfc01c74c293
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1388
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This function kicks off the draining process, so name it appropriately.
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Ic447aaa01612f6355ff4404d476419b55a3d0cff
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1386
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
In practice this worked out fine because the next step did an
spdk_for_each_core() which would always complete after the
performance dump with our current event library. But just in case,
make this an explicit wait.
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I07b96772ba15113cd04453243c980c6e405be872
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1385
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
More descriptive name. This is the number of outstanding
construct_job operations.
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I5c79ae06a521a8b6ef930146b0ce08791370a25c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1384
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Begin shifting to a model of "jobs", each defined as a single-threaded
I/O pattern.
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: If6c0cfc1a59d3acdec1e1e6ad65a16f810582aa8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1382
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
There's one of these per core and it's a collection of other
jobs to run, so name it reactor.
In the longer term, this reactor will go away and each "job"
will map to a separate spdk_thread.
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Ica5b19e6edb2509b48059d829e22a734acd6b298
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1381
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
A previous fix for miscompare had a slight issue with the scenario
where we chose an offset and then discover that it's already taken
because we've wrapped to this location before the previous IO
completed. In such case, we intended to bump the offset to just go
to the next block however we only bumped the local variable so the
next IO submitted will overwrite the previous.
The fix is simply to use the previously incremented target->offset
and increment it again for the next IO.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I26661eb0631ac50cc4f86f42f1d1789d297e204d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1250
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
There was no sync between the start of a w/r/v operation at
a specific block with the previous completion. This resulted
in data miscompares either because the initial Q depth was
sized such that a disk wrap need to occur to complete it or in
the event that an IO takes longer to complete than when bdevperf
loops back around to that offset.
Fixes#1208
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ifa55da54246735e7b603fafd34718965b0f27b94
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1180
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
To provide some more clues when this happens.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I098aaea906a1057e63f07c40a1ebb346a283983d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1070
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
At startup, use number of created io_target groups to detect completion
and move to the next step. By returning completion message to the
master thread, we can avoid using any atomic operation.
At shutdown, we can use spdk_for_each_channel() conveniently. Put
voluntary spdk_thread_exit() calls into the callback to
spdk_put_io_channel().
To maintain the original behavior, number of threads created is
equal to the number of cores that SPDK app uses.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I92ca4b1c1e8da0f45b47367bc2387701f4a9742f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/890
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>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Output performance dump per SPDK thread by using
spdk_for_each_channel(). This change is safe even when shutdown
case because spdk_for_each_channel() is serialized if it is
called on the same thread.
Keep lcore information because it is still valuable to know which
lcore each thread ran on for.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I996a4ca2c787d04672743b09a9415145cd8d0171
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/645
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This patch makes bdevperf_construct_targets_tasks() asynchronous
by using spdk_for_each_channel().
The next patch will make performance_dump() asynchronous even when
shutdown case by using spdk_for_each_channel().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1ebf39fe89a944d977d6f1808cf8607e8f477758
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/644
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>
This is a preparation to make bdevperf_construct_targets_tasks()
asynchronous by using spdk_for_each_channel() in the next patch.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I76c827550b2920abcba14abd7f15a3111ad10d39
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/643
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>
Squash changes for _bdevperf_construct_targets() and
bdevperf_free_targets() into a single patch to shrink the
patch series to reduce the burden of reviewers.
The pupose of the whole patch series is to move io_target from
core based to I/O channel based, and create SPDK thread per I/O channel.
It was not possible to create SPDK thread per core and then associate
target group with I/O channel as long as I tried.
So this patch moves io_target from core based to I/O channel based.
The later patch will create SPDK thread per I/O channel.
Each core has default reactor thread for now and so we can use
spdk_for_each_channel() even when we do not create and destroy SPDK
thread per target group yet.
The following is the detailed explanation:
_bdevperf_construct_targets():
Add a context for _bdevperf_construct_targets() to use
spdk_for_each_channel().
If g_every_core_for_each_bdev is false, set the target group to the
context and create target only on the group which matches the passed
group. If g_every_core_for_each_bdev is true, create target on all
groups.
Only the master thread can increment g_target_count. Hence hold
created number of targets temporary on the context and add it at
completion.
As a result of these changes, spdk_bdev_open() is called on the
thread which runs I/O to the bdev.
Hence bdevperf_target_gone() doesn't use message passing, and
bdevperf_complete() calls spdk_bdev_close() before sending
message to the master thread. Additionally, unregister pollers
directly in bdevperf_target_gone().
These changes also fix the potential issue that spdk_bdev_close()
would be called on the wrong thread if spdk_bdev_get_io_channel()
fails in bdevperf_submit_on_group().
bdevperf_free_targets():
Free each target on the thread which created it by using
spdk_for_each_channel().
This will make possible for us to use spdk_for_each_channel() for
performance dump even for shutdown case because
spdk_for_each_channel() is serialized if it is called on the same
thread.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4fcdb1024adf4704d3c59215da5669dfdc6cca1b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/641
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>
Follow the idea of bdev_get_iostat in module/bdev/rpc/bdev_rpc.c.
Add a global variable g_bdev_count and then set it to 1 as sentinel
value in bdev_construct_targets().
Subsequent patches will make _bdevperf_construct_targets() asynchronous.
Then bdevperf_construct_targets() will be truely asynchronous.
This patch is too small to be an independent patch but keep to
hold previous review result.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I49d0b6e6d61df65d4eb31c402f98cc4300482e20
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/639
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Firstly, change unmap suppor and I/O size checks to do once per
bdev. It is enough to check if unmap is supported and check if
I/O size is multiple of data block size once per bdev. Hence move
these checks from bdevperf_construct_target() to
_bdevperf_construct_targets().
Secondly, use calloc() to remove unnecessary zeroings in
bdevperf_construct_target().
Thirdly, factor out getting next io_target_group from
bdevperf_construct_target(). This is a preparation to make
bdevperf_construct_target() asynchronous by using
spdk_for_each_channel().
These may be better to break-up but these are already included in
the long patch series. So to reduce the burden of reviewers,
squash these into a single patch.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2cb94c8aa2b6b1a1b9e9a04da533e1fd093f8f29
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/640
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>
Factor out constructing multiple targets for a single bdev from
bdevperf_construct_targets() into an new helper function
_bdevperf_construct_targets().
Then change the return type of bdevperf_construct_targets() to void
and continue creating targets for subsequent bdevs even if failing
for any bdev. Additionally, remove a couple of comments in the source
code to avoid misunderstanding.
These changes will make us easier to use spdk_for_each_channel()
in bdevperf_construct_targets().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I3363931749b863c8de619939939d401f14e43d15
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/638
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>
Creating targets, creating tasks, and then running I/O is the actual
ordering of start-up. So adjust ordering of function calls to make
easier us to follow.
Change the return type of bdevperf_construct_targets_tasks() from
int to void, and call bdevperf_test() at the end of
bdevperf_construct_targets_tasks(). Then replace bdevperf_test() by
bdevperf_construct_targets_tasks().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id1396ff4ba199778300f5ddaf79db5f8f2e0ccb6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/642
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>
Move bdevperf_test() into bdevperf_construct_targets() from
_bdevperf_init_thread_done() and rpc_perform_tests(). Following the
last patch, this consolidation will make the code a little cleaner.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ided4653941f45ff6ac8edbea504560cc8a9fb5a0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/637
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>
The copy engine library, modules and public APIs have been renamed.
Use of the word `copy` has been replaced with the word `accel`
short for accelerator in preparation for adding new capabilities
in the future. Additionally, APIs for what was previously called
the `memcpy` engine have been renamed to identify the engine as a
software accelerator.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ia607aa718416146fbba1e6792b8de0f66bd8a5de
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/576
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Subsequent patches will call bdevperf_test() as callback to
bdevperf_construct_targets(). Changing return type of bdevperf_test()
to void and including its error handling will make the code cleaner.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I30fe38cfb73fbc593d079d5b66a540c0ce96fe19
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/636
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
_end_target() is an exception, and move just above bdevperf_complete().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2197a3b7ceb36ab29f0b69e31f3babd4e996f193
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/635
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>