Re: [Cluster-devel] [PATCH 2/2] mm, debug: report when GFP_NO{FS, IO} is used explicitly from memalloc_no{fs, io}_{save, restore} context

2016-04-27 Thread Dave Chinner
On Wed, Apr 27, 2016 at 10:03:11AM +0200, Michal Hocko wrote: > On Wed 27-04-16 08:58:45, Dave Chinner wrote: > > On Tue, Apr 26, 2016 at 01:56:12PM +0200, Michal Hocko wrote: > > > From: Michal Hocko > > > > > > THIS PATCH IS FOR TESTING ONLY AND NOT MEANT TO HIT LINUS TREE > >

Re: [Cluster-devel] [PATCH 1.2/2] mm: introduce memalloc_nofs_{save, restore} API

2016-04-27 Thread Michal Hocko
OK, so the lockdep splats I was seeing [1] were much easier to fix than I originally thought. So the following should be folded into the original patch. I will send the full patch later on. [1] http://lkml.kernel.org/r/20160427200927.gc22...@dhcp22.suse.cz --- >From

Re: [Cluster-devel] [PATCH 1.2/2] mm: introduce memalloc_nofs_{save, restore} API

2016-04-27 Thread Michal Hocko
On Wed 27-04-16 22:09:27, Michal Hocko wrote: [...] > [ 53.993480] [] mark_held_locks+0x5e/0x74 > [ 53.993480] [] lockdep_trace_alloc+0xb2/0xb5 > [ 53.993480] [] kmem_cache_alloc+0x36/0x2b0 Scratch that. I got it. It is the lockdep annotation which I got wrong with my patch. I thought

Re: [Cluster-devel] [PATCH 1.2/2] mm: introduce memalloc_nofs_{save, restore} API

2016-04-27 Thread Michal Hocko
Hi Dave, On Wed 27-04-16 13:54:35, Michal Hocko wrote: [...] > diff --git a/fs/xfs/kmem.h b/fs/xfs/kmem.h > index 0d83f332e5c2..b35688a54c9a 100644 > --- a/fs/xfs/kmem.h > +++ b/fs/xfs/kmem.h > @@ -50,7 +50,7 @@ kmem_flags_convert(xfs_km_flags_t flags) > lflags = GFP_ATOMIC |

Re: [Cluster-devel] [PATCH 1.1/2] xfs: abstract PF_FSTRANS to PF_MEMALLOC_NOFS

2016-04-27 Thread Michal Hocko
On Wed 27-04-16 11:41:51, Andreas Dilger wrote: > On Apr 27, 2016, at 5:54 AM, Michal Hocko wrote: [...] > > --- a/fs/xfs/kmem.c > > +++ b/fs/xfs/kmem.c > > @@ -80,13 +80,13 @@ kmem_zalloc_large(size_t size, xfs_km_flags_t flags) > > * context via PF_MEMALLOC_NOIO to

Re: [Cluster-devel] [PATCH 1.1/2] xfs: abstract PF_FSTRANS to PF_MEMALLOC_NOFS

2016-04-27 Thread Andreas Dilger
On Apr 27, 2016, at 5:54 AM, Michal Hocko wrote: > > From: Michal Hocko > > xfs has defined PF_FSTRANS to declare a scope GFP_NOFS semantic quite > some time ago. We would like to make this concept more generic and use > it for other filesystems as well.

[Cluster-devel] [GFS2 PATCH 3/3 v2] GFS2: Add retry loop to delete_work_func

2016-04-27 Thread Bob Peterson
Hi, I made a slight correction to the third patch I posted previously. I added the condition " || IS_ERR(inode)" to the delete_work_func, which needs to be there. This is the corrected version. The delete work function, delete_work_func, often doesn't find the inode needed to free an inode

[Cluster-devel] [GFS2 PATCH 3/3] GFS2: Add retry loop to delete_work_func

2016-04-27 Thread Bob Peterson
The delete work function, delete_work_func, often doesn't find the inode needed to free an inode that's been marked unlinked. That's because it only tries gfs2_ilookup once, and it's often not found because of two things: The fact that gfs2_lookup_by_inum is only called in an else condition, and

[Cluster-devel] [GFS2 PATCH 1/3] Revert "GFS2: Eliminate parameter non_block on gfs2_inode_lookup"

2016-04-27 Thread Bob Peterson
This reverts commit 73b462d2808d7cbca4d7886cf6aaed850640e6cd. Signed-off-by: Bob Peterson --- fs/gfs2/dir.c| 2 +- fs/gfs2/inode.c | 5 +++-- fs/gfs2/inode.h | 3 ++- fs/gfs2/ops_fstype.c | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git

[Cluster-devel] [GFS2 PATCH 0/3] Fix inode transition from unlinked to free

2016-04-27 Thread Bob Peterson
This is a set of three patches designed to fix the severely broken transition from unlinked to free dinodes. Previously, I had posted patches to ditch the code that filtered out I_FREEing inodes, but now I'm adding it back in and leveraging it for the new patch. The new patch basically adds retry

Re: [Cluster-devel] [PATCH 1.2/2] mm: introduce memalloc_nofs_{save, restore} API

2016-04-27 Thread Michal Hocko
On Wed 27-04-16 13:54:35, Michal Hocko wrote: > From: Michal Hocko > Ups missed Dave's note about: > GFP_NOFS context is used for the following 4 reasons currently > - to prevent from deadlocks when the lock held by the allocation > context would be needed during

[Cluster-devel] [PATCH 1.1/2] xfs: abstract PF_FSTRANS to PF_MEMALLOC_NOFS

2016-04-27 Thread Michal Hocko
From: Michal Hocko xfs has defined PF_FSTRANS to declare a scope GFP_NOFS semantic quite some time ago. We would like to make this concept more generic and use it for other filesystems as well. Let's start by giving the flag a more genric name PF_MEMALLOC_NOFS which is in line

[Cluster-devel] [PATCH 1.2/2] mm: introduce memalloc_nofs_{save, restore} API

2016-04-27 Thread Michal Hocko
From: Michal Hocko GFP_NOFS context is used for the following 4 reasons currently - to prevent from deadlocks when the lock held by the allocation context would be needed during the memory reclaim - to prevent from stack overflows during the reclaim

Re: [Cluster-devel] [PATCH 1/2] mm: add PF_MEMALLOC_NOFS

2016-04-27 Thread Michal Hocko
On Wed 27-04-16 09:07:02, Dave Chinner wrote: > On Tue, Apr 26, 2016 at 01:56:11PM +0200, Michal Hocko wrote: > > From: Michal Hocko > > > > GFP_NOFS context is used for the following 4 reasons currently > > - to prevent from deadlocks when the lock held by the allocation >