[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f6f0ac55-eba3-4ada-49ef-af9a5db37a0d@sandisk.com>
Date: Tue, 21 Jun 2016 10:14:49 +0200
From: Bart Van Assche <bart.vanassche@...disk.com>
To: Tejun Heo <tj@...nel.org>
CC: Bhaktipriya Shridhar <bhaktipriya96@...il.com>,
Doug Ledford <dledford@...hat.com>,
Sean Hefty <sean.hefty@...el.com>,
Hal Rosenstock <hal.rosenstock@...il.com>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC] IB/srp: Remove create_workqueue
On 06/20/2016 08:59 PM, Tejun Heo wrote:
> 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.
Agreed, as long as WQ_DFL_ACTIVE is not reduced from its current value
(256) to a very low value (e.g. 1 or 2). This assumption should be
documented but I'm not sure what the best way is to document this...
Bart.
Powered by blists - more mailing lists