From patchwork Thu Jan 31 19:30:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Wise X-Patchwork-Id: 10791315 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5F43B1390 for ; Thu, 31 Jan 2019 19:38:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 55F8830FED for ; Thu, 31 Jan 2019 19:38:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4922631199; Thu, 31 Jan 2019 19:38:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E140F30FED for ; Thu, 31 Jan 2019 19:38:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727789AbfAaTig (ORCPT ); Thu, 31 Jan 2019 14:38:36 -0500 Received: from opengridcomputing.com ([72.48.214.68]:42500 "EHLO smtp.opengridcomputing.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726893AbfAaTig (ORCPT ); Thu, 31 Jan 2019 14:38:36 -0500 Received: by smtp.opengridcomputing.com (Postfix, from userid 503) id 070A822791; Thu, 31 Jan 2019 13:38:35 -0600 (CST) Message-Id: <5f5a1e4e90f3625cea57ffa79fc0e5bcb7efe09d.1548963371.git.swise@opengridcomputing.com> From: Steve Wise Date: Thu, 31 Jan 2019 11:30:42 -0800 Subject: [PATCH rdma-next] RDMA/addr: create addr_wq with WQ_MEM_RECLAIM flag To: dledford@redhat.com, jgg@mellanox.com Cc: linux-rdma@vger.kernel.org Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP While running NVMe/oF wire unplug tests, we hit this warning in kernel/workqueue.c:check_flush_dependency(): WARN_ONCE(worker && ((worker->current_pwq->wq->flags & (WQ_MEM_RECLAIM | __WQ_LEGACY)) == WQ_MEM_RECLAIM), "workqueue: WQ_MEM_RECLAIM %s:%pf is flushing !WQ_MEM_RECLAIM %s:%pf", worker->current_pwq->wq->name, worker->current_func, target_wq->name, target_func); Which I think means we're flushing a workq that doesn't have WQ_MEM_RECLAIM set, from workqueue context that does have it set. Looking at rdma_addr_cancel() which is doing the flushing, it flushes the addr_wq which doesn't have MEM_RECLAIM set. Yet rdma_addr_cancel() is being called by the nvme host connection timeout/reconnect workqueue thread that does have WQ_MEM_RECLAIM set. So set WQ_MEM_RECLAIM on the addr_req workqueue. Signed-off-by: Steve Wise Reviewed-by: Parav Pandit --- drivers/infiniband/core/addr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c index 0dce94e3c495..1d88ee3ac8c7 100644 --- a/drivers/infiniband/core/addr.c +++ b/drivers/infiniband/core/addr.c @@ -868,7 +868,7 @@ static int netevent_callback(struct notifier_block *self, unsigned long event, int addr_init(void) { - addr_wq = alloc_ordered_workqueue("ib_addr", 0); + addr_wq = alloc_ordered_workqueue("ib_addr", WQ_MEM_RECLAIM); if (!addr_wq) return -ENOMEM;