[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180116162730.GQ3460072@devbig577.frc2.facebook.com>
Date: Tue, 16 Jan 2018 08:27:30 -0800
From: Tejun Heo <tj@...nel.org>
To: Prateek Sood <prsood@...eaurora.org>
Cc: Peter Zijlstra <peterz@...radead.org>, avagin@...il.com,
mingo@...nel.org, linux-kernel@...r.kernel.org,
cgroups@...r.kernel.org, sramana@...eaurora.org,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Subject: Re: [PATCH] cgroup/cpuset: fix circular locking dependency
Hello, Prateek.
On Mon, Jan 15, 2018 at 05:32:18PM +0530, Prateek Sood wrote:
> My understanding of WQ_MEM_RECLAIM was that it needs to be used for
> cases where memory pressure could cause deadlocks.
Yes, that is the primary role; however, there are a couple places
where we need it to isolate a low level subsystem's forward progress
from the dependencies of the dynanic worker pool management.
> In this case it does not seem to be a memory pressure issue.
> Overloading WQ_MEM_RECLAIM usage for solution to another problem
> is the correct approach?
In general, we don't face this issue but for things like RCU, I do
believe this is the right approach. The name of the flag is a bit of
misnomer for those cases as it only describes one of the dependencies
of worker pool management. I don't think it's an actual problem given
that vast majority of the usages are protecting against memory
dependency.
> This scenario can be resolved by using WQ_MEM_RECLAIM and a separate
> workqueue for rcu. But there seems to be a possibility in future if
> any cpu hotplug callbacks use other predefined workqueues which do not
> have WQ_MEM_RECLAIM option.
We want to isolate from this sort of dependencies anyway, especially
how widely and deeply we depend on RCU these days. Maybe we will
develop a justified case in the future but at least up until now every
case around this issue seems to be something to be fixed on their own.
Thanks.
--
tejun
Powered by blists - more mailing lists