From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932654AbcFTTGH (ORCPT ); Mon, 20 Jun 2016 15:06:07 -0400 Received: from mail-yw0-f178.google.com ([209.85.161.178]:33028 "EHLO mail-yw0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751857AbcFTTFf (ORCPT ); Mon, 20 Jun 2016 15:05:35 -0400 Date: Mon, 20 Jun 2016 14:59:22 -0400 From: Tejun Heo To: Bart Van Assche Cc: Bhaktipriya Shridhar , Doug Ledford , Sean Hefty , Hal Rosenstock , "linux-rdma@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [RFC] IB/srp: Remove create_workqueue Message-ID: <20160620185922.GQ3262@mtj.duckdns.org> References: <20160607181617.GA6556@Karyakshetra> <20160607192106.GY31708@htj.duckdns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Bart. On Tue, Jun 07, 2016 at 01:00:13PM -0700, Bart Van Assche wrote: > > > > srp_remove_wq is used for SRP target port removal work only. This work is > > > > neither queued from inside a shrinker nor by the page writeback code so I > > > > think it is safe to drop WQ_MEM_RECLAIM. > > > > > > It should be able to use system_wq then. > > > > No. I have tried that but that resulted in a deadlock. > > See also commit bcc059103591 for the details. So, create_workqueue() limits concurrency to 1 per cpu and if you have a dependency between two work items and they get scheduled on the same cpu they can deadlock. system_wq doesn't have that restriction and should be fine, AFAICS. Thanks! -- tejun