Re: [PATCH RFC] ashmem: Fix lockdep RECLAIM_FS false positive

2018-02-07 Thread Joel Fernandes
On Wed, Feb 7, 2018 at 4:35 PM, NeilBrown wrote: >> On Wed, Feb 7, 2018 at 8:58 AM, Peter Zijlstra wrote: >> [...] >>> Lockdep reports this issue when GFP_FS is infact set, and we enter this path and acquire the lock. So lockdep seems to be doing the right thing however by design i

Re: [PATCH RFC] ashmem: Fix lockdep RECLAIM_FS false positive

2018-02-07 Thread NeilBrown
On Wed, Feb 07 2018, Joel Fernandes wrote: > Hi Peter, > > On Wed, Feb 7, 2018 at 8:58 AM, Peter Zijlstra wrote: > [...] >> >>> Lockdep reports this issue when GFP_FS is infact set, and we enter >>> this path and acquire the lock. So lockdep seems to be doing the right >>> thing however by design

Re: [PATCH RFC] ashmem: Fix lockdep RECLAIM_FS false positive

2018-02-07 Thread Joel Fernandes
Hi Peter, On Wed, Feb 7, 2018 at 8:58 AM, Peter Zijlstra wrote: [...] > >> Lockdep reports this issue when GFP_FS is infact set, and we enter >> this path and acquire the lock. So lockdep seems to be doing the right >> thing however by design it is reporting a false-positive. > > So I'm not seein

Re: [PATCH RFC] ashmem: Fix lockdep RECLAIM_FS false positive

2018-02-07 Thread Peter Zijlstra
On Wed, Feb 07, 2018 at 08:09:36AM -0800, Joel Fernandes wrote: > Hi Peter, > > On Wed, Feb 7, 2018 at 12:07 AM, Peter Zijlstra wrote: > > On Mon, Feb 05, 2018 at 04:49:03PM -0800, Joel Fernandes wrote: > > > >> [ 2115.359650] -(1)[106:kswapd0]= > >> [ 2115.359665]

Re: [PATCH RFC] ashmem: Fix lockdep RECLAIM_FS false positive

2018-02-07 Thread Joel Fernandes
Hi Peter, On Wed, Feb 7, 2018 at 12:07 AM, Peter Zijlstra wrote: > On Mon, Feb 05, 2018 at 04:49:03PM -0800, Joel Fernandes wrote: > >> [ 2115.359650] -(1)[106:kswapd0]= >> [ 2115.359665] -(1)[106:kswapd0][ INFO: inconsistent lock state ] >> [ 2115.359684] -(1)[106

Re: [PATCH RFC] ashmem: Fix lockdep RECLAIM_FS false positive

2018-02-07 Thread Peter Zijlstra
On Mon, Feb 05, 2018 at 04:49:03PM -0800, Joel Fernandes wrote: > [ 2115.359650] -(1)[106:kswapd0]= > [ 2115.359665] -(1)[106:kswapd0][ INFO: inconsistent lock state ] > [ 2115.359684] -(1)[106:kswapd0]4.9.60+ #2 Tainted: GW O > [ 2115.359699] -(1)[106:kswa

Re: [PATCH RFC] ashmem: Fix lockdep RECLAIM_FS false positive

2018-02-06 Thread Joel Fernandes
Hi Minchan, On Tue, Feb 6, 2018 at 2:55 PM, Minchan Kim wrote: > On Tue, Feb 06, 2018 at 02:32:13PM -0800, Joel Fernandes wrote: [...] >> On Tue, Feb 6, 2018 at 2:01 PM, Minchan Kim wrote: >> [...] >> > On Mon, Feb 05, 2018 at 04:49:03PM -0800, Joel Fernandes wrote: >> >> During invocation of as

Re: [PATCH RFC] ashmem: Fix lockdep RECLAIM_FS false positive

2018-02-06 Thread Minchan Kim
On Tue, Feb 06, 2018 at 02:32:13PM -0800, Joel Fernandes wrote: > Hi Minchan, > > On Tue, Feb 6, 2018 at 2:01 PM, Minchan Kim wrote: > [...] > > On Mon, Feb 05, 2018 at 04:49:03PM -0800, Joel Fernandes wrote: > >> During invocation of ashmem shrinker under memory pressure, ashmem > >> calls into

Re: [PATCH RFC] ashmem: Fix lockdep RECLAIM_FS false positive

2018-02-06 Thread Joel Fernandes
Hi Minchan, On Tue, Feb 6, 2018 at 2:01 PM, Minchan Kim wrote: [...] > On Mon, Feb 05, 2018 at 04:49:03PM -0800, Joel Fernandes wrote: >> During invocation of ashmem shrinker under memory pressure, ashmem >> calls into VFS code via vfs_fallocate. We however make sure we >> don't enter it if the a

Re: [PATCH RFC] ashmem: Fix lockdep RECLAIM_FS false positive

2018-02-06 Thread Minchan Kim
Hi Joel, On Mon, Feb 05, 2018 at 04:49:03PM -0800, Joel Fernandes wrote: > During invocation of ashmem shrinker under memory pressure, ashmem > calls into VFS code via vfs_fallocate. We however make sure we > don't enter it if the allocation was GFP_FS to prevent looping > into filesystem code. Ho

[PATCH RFC] ashmem: Fix lockdep RECLAIM_FS false positive

2018-02-05 Thread Joel Fernandes
During invocation of ashmem shrinker under memory pressure, ashmem calls into VFS code via vfs_fallocate. We however make sure we don't enter it if the allocation was GFP_FS to prevent looping into filesystem code. However lockdep doesn't know this and prints a lockdep splat as below. This patch f