OpenCloudOS-Kernel/drivers/nvme/host
Nigel Kirkland 97b2512ad0 nvme: prevent warning triggered by nvme_stop_keep_alive
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.

Change nvme-rdma and nvme-tcp to perform err_work in nvme_reset_wq.

Signed-off-by: Nigel Kirkland <nigel.kirkland@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-02-14 10:12:04 -07:00
..
Kconfig block: Allow t10-pi to be modular 2020-01-06 20:59:04 -07:00
Makefile nvme: Add hardware monitoring support 2019-11-12 01:57:35 +09:00
core.c nvme: prevent warning triggered by nvme_stop_keep_alive 2020-02-14 10:12:04 -07:00
fabrics.c nvme-fabrics: allow discovery subsystems accept a kato 2019-09-12 08:50:46 -07:00
fabrics.h nvme: Remove ADMIN_ONLY state 2019-10-14 23:21:44 +09:00
fault_inject.c nvme: enable to inject errors into admin commands 2019-06-21 11:15:50 +02:00
fc.c nvme-fc: fix double-free scenarios on hw queues 2019-11-27 03:00:13 +09:00
hwmon.c nvme: hwmon: add quirk to avoid changing temperature threshold 2019-11-22 02:21:08 +09:00
lightnvm.c lightnvm: move metadata mapping to lower level driver 2019-08-06 08:20:10 -06:00
multipath.c for-5.5/drivers-20191121 2019-11-25 11:15:41 -08:00
nvme.h nvme-rdma: Avoid preallocating big SGL for data 2019-11-27 02:13:45 +09:00
pci.c nvme-pci: remove nvmeq->tags 2020-02-04 03:00:25 +09:00
rdma.c nvme: prevent warning triggered by nvme_stop_keep_alive 2020-02-14 10:12:04 -07:00
tcp.c nvme: prevent warning triggered by nvme_stop_keep_alive 2020-02-14 10:12:04 -07:00
trace.c nvme: trace: parse Get LBA Status command in detail 2019-08-29 12:55:01 -07:00
trace.h nvme-trace: print result and status in hex format 2019-06-21 11:12:37 +02:00