[PATCH] nvmet: use a private workqueue instead of the system workqueue

Max Gurtovoy mgurtovoy at nvidia.com
Tue Mar 22 05:07:33 PDT 2022


Sagi,

On 3/21/2022 1:57 PM, Sagi Grimberg wrote:
> Any attempt to flush kernel-global WQs has possibility of deadlock
> so we should simply stop using them, instead introduce nvmet_wq
> which is the generic nvmet workqueue for work elements that
> don't explicitly require a dedicated workqueue (by the mere fact
> that they are using the system_wq).
>
> Changes were done using the following replaces:
> s/schedule_work(/queue_work(nvmet_wq, /g
> s/schedule_delayed_work(/queue_delayed_work(nvmet_wq, /g
> s/flush_scheduled_work()/flush_workqueue(nvmet_wq)/g

should we have the same commit for iser Target ?

it uses schedule_delayed_work & flush_scheduled_work as well..


> Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
> ---
>   drivers/nvme/target/admin-cmd.c     |  2 +-
>   drivers/nvme/target/configfs.c      |  2 +-
>   drivers/nvme/target/core.c          | 22 ++++++++++++++++------
>   drivers/nvme/target/fc.c            |  8 ++++----
>   drivers/nvme/target/fcloop.c        | 16 ++++++++--------
>   drivers/nvme/target/io-cmd-file.c   |  6 +++---
>   drivers/nvme/target/loop.c          |  4 ++--
>   drivers/nvme/target/modules.builtin |  0
>   drivers/nvme/target/nvmet.h         |  1 +
>   drivers/nvme/target/passthru.c      |  2 +-
>   drivers/nvme/target/rdma.c          | 12 ++++++------
>   drivers/nvme/target/tcp.c           | 10 +++++-----
>   12 files changed, 48 insertions(+), 37 deletions(-)
>   create mode 100644 drivers/nvme/target/modules.builtin

Looks good,

Reviewed-by: Max Gurtovoy <mgurtovoy at nvidia.com>





More information about the Linux-nvme mailing list