From: James Smart <jsmart2021@gmail.com>
To: linux-nvme@lists.infradead.org
Cc: maxg@mellanox.com, James Smart <jsmart2021@gmail.com>,
mark.wunderlich@intel.com, hch@lst.de, sagi@grimberg.me
Subject: [PATCH 0/2] nvme: prevent warning triggered by nvme_stop_keep_alive
Date: Thu, 6 Feb 2020 11:13:40 -0800 [thread overview]
Message-ID: <20200206191342.10190-1-jsmart2021@gmail.com> (raw)
Delayed keep alive work is queued on system workqueue and may be cancelled
via nvme_stop_keep_alive from nvme_reset_wq, nvme_fc_wq or nvme_wq.
Check_flush_dependency detects mismatched attributes between the work-queue
context used to cancel the keep alive work and system-wq. Specifically
system-wq does not have the WQ_MEM_RECLAIM flag, whereas the contexts used
to cancel keep alive work have WQ_MEM_RECLAIM flag.
Example warning:
workqueue: WQ_MEM_RECLAIM nvme-reset-wq:nvme_fc_reset_ctrl_work [nvme_fc]
is flushing !WQ_MEM_RECLAIM events:nvme_keep_alive_work [nvme_core]
To avoid the flags mismatch, delayed keep alive work is queued on nvme_wq.
However this creates a secondary concern where work and a request to cancel
that work may be in the same work queue - namely err_work in the rdma and
tcp transports, which will want to flush/cancel the keep alive work which
will now be on nvme_wq.
After reviewing the transports, it looks like err_work can be moved to
nvme_reset_wq. In fact that aligns them better with transition into
RESETTING and performing related reset work in nvme_reset_wq.
James Smart (2):
nvme: move keep alive processing to nvme-wq
nvme-rdma/nvme-tcp: Move err_work to nvme_reset_wq
drivers/nvme/host/core.c | 10 +++++-----
drivers/nvme/host/rdma.c | 2 +-
drivers/nvme/host/tcp.c | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
--
2.13.7
_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next reply other threads:[~2020-02-06 19:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-06 19:13 James Smart [this message]
2020-02-06 19:13 ` [PATCH 1/2] nvme: move keep alive processing to nvme-wq James Smart
2020-02-07 0:05 ` Sagi Grimberg
2020-02-10 17:04 ` Christoph Hellwig
2020-02-11 3:00 ` Keith Busch
2020-02-11 17:50 ` James Smart
2020-02-06 19:13 ` [PATCH 2/2] nvme-rdma/nvme-tcp: Move err_work to nvme_reset_wq James Smart
2020-02-07 0:06 ` Sagi Grimberg
2020-02-10 17:04 ` Christoph Hellwig
2020-02-11 10:12 ` Max Gurtovoy
2020-02-11 17:56 ` James Smart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200206191342.10190-1-jsmart2021@gmail.com \
--to=jsmart2021@gmail.com \
--cc=hch@lst.de \
--cc=linux-nvme@lists.infradead.org \
--cc=mark.wunderlich@intel.com \
--cc=maxg@mellanox.com \
--cc=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox