From patchwork Tue Aug 15 16:12:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sagi Grimberg X-Patchwork-Id: 9902147 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 03B92602C9 for ; Tue, 15 Aug 2017 16:13:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E9FD02889B for ; Tue, 15 Aug 2017 16:13:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DF1972889E; Tue, 15 Aug 2017 16:13:01 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 597962889B for ; Tue, 15 Aug 2017 16:13:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752729AbdHOQNA (ORCPT ); Tue, 15 Aug 2017 12:13:00 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:42231 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751031AbdHOQNA (ORCPT ); Tue, 15 Aug 2017 12:13:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Tw2sVKT5Z0cwi153rCrOt/t1P98MbZy6lzFUJX6JmMM=; b=uHW/MFSBOBGE0n512ME4rwAM/ mWaPG+RZOmKsGYQiV71/caRNhNx8JL7bsnL4S6+ADM7TBzVTzR+ERpbOWssJJQGrBgpcL30ci23SS /7H4ncVvYMJyBvn1vOjD++UzoSrTcTTFYWZbZTaoy9v/YxMfEGwIYyDV7C7dDy/lpuuX4qypr+gXx DnglQxARDYUSeYsPS4NkBY/x4e/MkOXSbFJJFGWYBCJe74w0HdQzNiDTFWdWKDe1OHFXrCyA8VWka 6AkN1vfqe0UlEe+mdR1EGXMvAVLsrWfepZy3XVkaZqoghTKvr/SoLNBeFBCTDEohD67TcEoahAUlx 7joBUyVHQ==; Received: from bzq-82-81-101-184.red.bezeqint.net ([82.81.101.184] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.87 #1 (Red Hat Linux)) id 1dheSh-000808-1D; Tue, 15 Aug 2017 16:12:59 +0000 From: Sagi Grimberg To: Doug Ledford , linux-rdma@vger.kernel.org Cc: Steve Wise Subject: [PATCH 1/2] cm: Don't allocate ib_cm workqueue with WQ_MEM_RECLAIM Date: Tue, 15 Aug 2017 19:12:53 +0300 Message-Id: <1502813574-6040-2-git-send-email-sagi@grimberg.me> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1502813574-6040-1-git-send-email-sagi@grimberg.me> References: <1502813574-6040-1-git-send-email-sagi@grimberg.me> 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 create_workqueue always creates the worqeueu with WQ_MEM_RECLAIM and silences a flush dependancy warn for WQ_LEGACY. Instead, we want to keep the warn in case the allocator tries to flush the cm workqueue because its very likely that cm work execution will yield memory allocations (for example cm connection requests) . Reported-by: Steve Wise Signed-off-by: Sagi Grimberg Reviewed-by: Steve Wise Reviewed-by: Leon Romanovsky --- drivers/infiniband/core/cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c index 2b4d613a3474..838e3507eadc 100644 --- a/drivers/infiniband/core/cm.c +++ b/drivers/infiniband/core/cm.c @@ -4201,7 +4201,7 @@ static int __init ib_cm_init(void) goto error1; } - cm.wq = create_workqueue("ib_cm"); + cm.wq = alloc_workqueue("ib_cm", 0, 1); if (!cm.wq) { ret = -ENOMEM; goto error2;