linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] nvme: prevent warning triggered by nvme_stop_keep_alive
@ 2020-02-06 19:13 James Smart
  2020-02-06 19:13 ` [PATCH 1/2] nvme: move keep alive processing to nvme-wq James Smart
  2020-02-06 19:13 ` [PATCH 2/2] nvme-rdma/nvme-tcp: Move err_work to nvme_reset_wq James Smart
  0 siblings, 2 replies; 11+ messages in thread
From: James Smart @ 2020-02-06 19:13 UTC (permalink / raw)
  To: linux-nvme; +Cc: maxg, James Smart, mark.wunderlich, hch, sagi

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-02-11 18:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-06 19:13 [PATCH 0/2] nvme: prevent warning triggered by nvme_stop_keep_alive James Smart
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).