linux/drivers/infiniband/hw
Mike Marciniszyn 4c4b1996b5 IB/hfi1: Fix WQ_MEM_RECLAIM warning
The work_item cancels that occur when a QP is destroyed can elicit the
following trace:

 workqueue: WQ_MEM_RECLAIM ipoib_wq:ipoib_cm_tx_reap [ib_ipoib] is flushing !WQ_MEM_RECLAIM hfi0_0:_hfi1_do_send [hfi1]
 WARNING: CPU: 7 PID: 1403 at kernel/workqueue.c:2486 check_flush_dependency+0xb1/0x100
 Call Trace:
  __flush_work.isra.29+0x8c/0x1a0
  ? __switch_to_asm+0x40/0x70
  __cancel_work_timer+0x103/0x190
  ? schedule+0x32/0x80
  iowait_cancel_work+0x15/0x30 [hfi1]
  rvt_reset_qp+0x1f8/0x3e0 [rdmavt]
  rvt_destroy_qp+0x65/0x1f0 [rdmavt]
  ? _cond_resched+0x15/0x30
  ib_destroy_qp+0xe9/0x230 [ib_core]
  ipoib_cm_tx_reap+0x21c/0x560 [ib_ipoib]
  process_one_work+0x171/0x370
  worker_thread+0x49/0x3f0
  kthread+0xf8/0x130
  ? max_active_store+0x80/0x80
  ? kthread_bind+0x10/0x10
  ret_from_fork+0x35/0x40

Since QP destruction frees memory, hfi1_wq should have the WQ_MEM_RECLAIM.

The hfi1_wq does not allocate memory with GFP_KERNEL or otherwise become
entangled with memory reclaim, so this flag is appropriate.

Fixes: 0a226edd20 ("staging/rdma/hfi1: Use parallel workqueue for SDMA engines")
Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2019-05-06 12:57:45 -03:00
..
bnxt_re RDMA: Introduce and use GID attr helper to read RoCE L2 fields 2019-05-03 11:10:02 -03:00
cxgb3 RDMA: Get rid of iw_cm_verbs 2019-05-03 10:56:56 -03:00
cxgb4 RDMA: Get rid of iw_cm_verbs 2019-05-03 10:56:56 -03:00
hfi1 IB/hfi1: Fix WQ_MEM_RECLAIM warning 2019-05-06 12:57:45 -03:00
hns RDMA: Introduce and use GID attr helper to read RoCE L2 fields 2019-05-03 11:10:02 -03:00
i40iw RDMA: Get rid of iw_cm_verbs 2019-05-03 10:56:56 -03:00
mlx4 RDMA: Introduce and use GID attr helper to read RoCE L2 fields 2019-05-03 11:10:02 -03:00
mlx5 RDMA/mlx5: Remove MAYEXEC flag 2019-05-06 12:56:55 -03:00
mthca RDMA: Handle SRQ allocations by IB/core 2019-04-08 13:05:25 -03:00
nes RDMA: Get rid of iw_cm_verbs 2019-05-03 10:56:56 -03:00
ocrdma RDMA: Introduce and use GID attr helper to read RoCE L2 fields 2019-05-03 11:10:02 -03:00
qedr RDMA: Introduce and use GID attr helper to read RoCE L2 fields 2019-05-03 11:10:02 -03:00
qib IB/{rdmavt, qib, hfi1}: Use new routine to release reference counts 2019-04-24 11:31:49 -03:00
usnic IB: Pass only ib_udata in function prototypes 2019-04-01 15:00:47 -03:00
vmw_pvrdma Merge branch 'rdma_mmap' into rdma.git for-next 2019-04-24 16:20:34 -03:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00