Re: [PATCH 13/19] MM: set PF_FSTRANS while allocating per-cpu memory to avoid deadlock.

2014-04-15 Thread Dave Chinner
On Wed, Apr 16, 2014 at 04:22:01PM +1000, NeilBrown wrote: > On Wed, 16 Apr 2014 15:49:42 +1000 Dave Chinner wrote: > > > On Wed, Apr 16, 2014 at 02:03:36PM +1000, NeilBrown wrote: > > > lockdep reports a locking chain > > > > > > sk_lock-AF_INET --> rtnl_mutex --> pcpu_alloc_mutex > > > > >

Re: [PATCH 13/19] MM: set PF_FSTRANS while allocating per-cpu memory to avoid deadlock.

2014-04-15 Thread NeilBrown
On Wed, 16 Apr 2014 15:49:42 +1000 Dave Chinner wrote: > On Wed, Apr 16, 2014 at 02:03:36PM +1000, NeilBrown wrote: > > lockdep reports a locking chain > > > > sk_lock-AF_INET --> rtnl_mutex --> pcpu_alloc_mutex > > > > As sk_lock may be needed to reclaim memory, allowing that > > reclaim whi

Re: [PATCH 13/19] MM: set PF_FSTRANS while allocating per-cpu memory to avoid deadlock.

2014-04-15 Thread Dave Chinner
On Wed, Apr 16, 2014 at 02:03:36PM +1000, NeilBrown wrote: > lockdep reports a locking chain > > sk_lock-AF_INET --> rtnl_mutex --> pcpu_alloc_mutex > > As sk_lock may be needed to reclaim memory, allowing that > reclaim while pcu_alloc_mutex is held can lead to deadlock. > So set PF_FSTRANS wh

[PATCH 13/19] MM: set PF_FSTRANS while allocating per-cpu memory to avoid deadlock.

2014-04-15 Thread NeilBrown
lockdep reports a locking chain sk_lock-AF_INET --> rtnl_mutex --> pcpu_alloc_mutex As sk_lock may be needed to reclaim memory, allowing that reclaim while pcu_alloc_mutex is held can lead to deadlock. So set PF_FSTRANS while it is help to avoid the FS reclaim. pcpu_alloc_mutex can be taken wh