[PATCH for-rc 1/5] IB/hfi1: Fix WQ_MEM_RECLAIM warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Mike Marciniszyn <mike.marciniszyn@xxxxxxxxx>

The work_item cancels that occur when a QP is destroyed
can elicit the following trace:

[  708.997199] workqueue: WQ_MEM_RECLAIM ipoib_wq:ipoib_cm_tx_reap [ib_ipoib] is flushing !WQ_MEM_RECLAIM hfi0_0:_hfi1_do_send [hfi1]
[  708.997209] WARNING: CPU: 7 PID: 1403 at kernel/workqueue.c:2486 check_flush_dependency+0xb1/0x100
[  709.227743] Call Trace:
[  709.230852]  __flush_work.isra.29+0x8c/0x1a0
[  709.235779]  ? __switch_to_asm+0x40/0x70
[  709.240335]  __cancel_work_timer+0x103/0x190
[  709.245253]  ? schedule+0x32/0x80
[  709.249216]  iowait_cancel_work+0x15/0x30 [hfi1]
[  709.254475]  rvt_reset_qp+0x1f8/0x3e0 [rdmavt]
[  709.259554]  rvt_destroy_qp+0x65/0x1f0 [rdmavt]
[  709.264703]  ? _cond_resched+0x15/0x30
[  709.269081]  ib_destroy_qp+0xe9/0x230 [ib_core]
[  709.274223]  ipoib_cm_tx_reap+0x21c/0x560 [ib_ipoib]
[  709.279799]  process_one_work+0x171/0x370
[  709.284425]  worker_thread+0x49/0x3f0
[  709.288695]  kthread+0xf8/0x130
[  709.292450]  ? max_active_store+0x80/0x80
[  709.297050]  ? kthread_bind+0x10/0x10
[  709.301293]  ret_from_fork+0x35/0x40
[  709.305441] ---[ end trace f0e973737146499b ]---

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

Fixes: 0a226edd203f ("staging/rdma/hfi1: Use parallel workqueue for SDMA engines")
Reviewed-by: Michael J. Ruhl <michael.j.ruhl@xxxxxxxxx>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@xxxxxxxxx>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@xxxxxxxxx>
---
 drivers/infiniband/hw/hfi1/init.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/infiniband/hw/hfi1/init.c b/drivers/infiniband/hw/hfi1/init.c
index 7841a0a..3cd6f07 100644
--- a/drivers/infiniband/hw/hfi1/init.c
+++ b/drivers/infiniband/hw/hfi1/init.c
@@ -800,7 +800,8 @@ static int create_workqueues(struct hfi1_devdata *dd)
 			ppd->hfi1_wq =
 				alloc_workqueue(
 				    "hfi%d_%d",
-				    WQ_SYSFS | WQ_HIGHPRI | WQ_CPU_INTENSIVE,
+				    WQ_SYSFS | WQ_HIGHPRI | WQ_CPU_INTENSIVE |
+				    WQ_MEM_RECLAIM,
 				    HFI1_MAX_ACTIVE_WORKQUEUE_ENTRIES,
 				    dd->unit, pidx);
 			if (!ppd->hfi1_wq)




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux