Spdk/examples
Shuhei Matsumoto 8753fdb645 example/nvmf: Run SPDK threads by FIFO to avoid deadlock
if spdk_thread_poll() calls spdk_thread_create() to create SPDK
thread dynamically, it will acquire nvmf_reactor->mutex and will
cause deadlock because the queue nvmf_reactor->threads is accessed
by any POSIX thread by holding nvmf_reactor->mutex.

If any non-owner POSIX thread manipulate nvmf_reactor->threads by
holding nvmf_reactor->threads, like general priority based scheduler,
running SPDK threads by FIFO will be better.

Change nvmf_reactor_run() to dequeue a SPDK thread from the head, run
it, and then enqueue it to the tail. Release nvmf_reactor->mutex
while spdk_thread_poll() is executed.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9b4040cc4d995beaf4a1f9ed8260bb1254d7d7fb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2537
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-22 10:43:30 +00:00
..
accel examples/accel_perf: Add CRC-32C workload type 2020-05-15 08:12:13 +00:00
bdev lib/thread: Wait until thread_is_exited() is true by thread_poll() after thread_exit() 2020-04-08 06:43:05 +00:00
blob examples/blob: skip '\0' when dump xattr's value 2020-04-09 08:08:07 +00:00
ioat test/ioat: ioat_perf app will exit with error code 2020-04-10 07:07:11 +00:00
nvme Change fio version to 3.19 2020-05-21 09:20:01 +00:00
nvmf example/nvmf: Run SPDK threads by FIFO to avoid deadlock 2020-05-22 10:43:30 +00:00
sock lib/thread: Use function name as poller name by using macro SPDK_POLLER_REGISTER 2020-04-15 07:23:09 +00:00
vmd lib/vmd: detach devices during shutdown 2020-02-04 16:50:25 +00:00
Makefile examples/accel/perf: perf tool using the accel framework 2020-03-16 08:45:13 +00:00