From patchwork Tue Aug 15 19:20:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sagi Grimberg X-Patchwork-Id: 9902413 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 DCD6D60230 for ; Tue, 15 Aug 2017 19:20:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D0C7F288DA for ; Tue, 15 Aug 2017 19:20:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C5A77288EE; Tue, 15 Aug 2017 19:20:46 +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=-5.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, URIBL_BLACK 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 4CE28288DA for ; Tue, 15 Aug 2017 19:20:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752381AbdHOTUp (ORCPT ); Tue, 15 Aug 2017 15:20:45 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:54988 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752311AbdHOTUp (ORCPT ); Tue, 15 Aug 2017 15:20:45 -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=MmBtcL4efKgyc9GQLifXgyN/+UGgmeuE8NDfVWlvAnU=; b=gGsZSF19OzByseuZwDzHD8AaN /cH4jLHriLq7pr7AfaZYRf9hpHI5Bpg5hPdTUML4hMxIucx1Q/77rIsvXFyLWTX8mNI4S6HrjdkHs 6jaQdUzgeD1lBX/p/MDG6an+Mi1Pds60Y1hacX4kPCbuz4lOuRDbH7pMkYwWXP4ni0jx4jyg50bJk qtiIzeQANVEi6cox0JVT+jewu+tRxuzzNuwW88dW3OQeX+v/6Id3tCt3xrbhmSwKqWEjPGLO11FHc dir3XPYxjv5xR+O3g1GIk9CYoEVP/R4y/As+RXj+4A5cOXBdK4qYK7ScMJuWPqcZ41j19wnkuNzHk D8Bn/CgZA==; 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 1dhhOO-0003JB-3n; Tue, 15 Aug 2017 19:20:44 +0000 From: Sagi Grimberg To: Doug Ledford , linux-rdma@vger.kernel.org Cc: Steve Wise Subject: [PATCH v2 1/2] cm: Don't allocate ib_cm workqueue with WQ_MEM_RECLAIM Date: Tue, 15 Aug 2017 22:20:37 +0300 Message-Id: <1502824838-21745-2-git-send-email-sagi@grimberg.me> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1502824838-21745-1-git-send-email-sagi@grimberg.me> References: <1502824838-21745-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 workqueue with WQ_MEM_RECLAIM and silences a flush dependency 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 Reviewed-by: Steve Wise Reviewed-by: Leon Romanovsky Signed-off-by: Sagi Grimberg --- 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;