Re: [f2fs-dev] [PATCH 4/8] xfs: use memalloc_nofs_{save, restore} instead of memalloc_noio*

2017-01-09 Thread Brian Foster
On Fri, Jan 06, 2017 at 03:11:03PM +0100, Michal Hocko wrote: > From: Michal Hocko > > kmem_zalloc_large and _xfs_buf_map_pages use memalloc_noio_{save,restore} > API to prevent from reclaim recursion into the fs because vmalloc can > invoke unconditional GFP_KERNEL allocations and these function

Re: [f2fs-dev] [PATCH] mm: support __GFP_REPEAT in kvmalloc_node

2017-01-09 Thread Michal Hocko
On Fri 06-01-17 13:09:36, Vlastimil Babka wrote: > On 01/04/2017 07:12 PM, Michal Hocko wrote: > > While checking opencoded users I've encountered that vhost code would > > really like to use kvmalloc with __GFP_REPEAT [1] so the following patch > > adds support for __GFP_REPEAT and converts both v

Re: [f2fs-dev] [PATCH 3/8] mm: introduce memalloc_nofs_{save, restore} API

2017-01-09 Thread Vlastimil Babka
On 01/06/2017 03:11 PM, Michal Hocko wrote: > From: Michal Hocko > > GFP_NOFS context is used for the following 5 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

Re: [f2fs-dev] [PATCH 4/8] xfs: use memalloc_nofs_{save, restore} instead of memalloc_noio*

2017-01-09 Thread Vlastimil Babka
On 01/06/2017 03:11 PM, Michal Hocko wrote: > From: Michal Hocko > > kmem_zalloc_large and _xfs_buf_map_pages use memalloc_noio_{save,restore} > API to prevent from reclaim recursion into the fs because vmalloc can > invoke unconditional GFP_KERNEL allocations and these functions might be > calle

Re: [f2fs-dev] [PATCH 4/8] xfs: use memalloc_nofs_{save, restore} instead of memalloc_noio*

2017-01-09 Thread Michal Hocko
On Mon 09-01-17 15:08:27, Vlastimil Babka wrote: > On 01/06/2017 03:11 PM, Michal Hocko wrote: > > From: Michal Hocko > > > > kmem_zalloc_large and _xfs_buf_map_pages use memalloc_noio_{save,restore} > > API to prevent from reclaim recursion into the fs because vmalloc can > > invoke unconditiona

Re: [f2fs-dev] [PATCH 3/8] mm: introduce memalloc_nofs_{save, restore} API

2017-01-09 Thread Michal Hocko
On Mon 09-01-17 14:42:10, Michal Hocko wrote: > On Mon 09-01-17 14:04:21, Vlastimil Babka wrote: [...] > Now that you have opened this I have noticed that the code is wrong > here because GFP_HIGHUSER_MOVABLE & ~GFP_RECLAIM_MASK would overwrite > the removed GFP_FS. Blee, it wouldn't because ~GFP_

Re: [f2fs-dev] [PATCH 3/8] mm: introduce memalloc_nofs_{save, restore} API

2017-01-09 Thread Vlastimil Babka
On 01/09/2017 02:42 PM, Michal Hocko wrote: > On Mon 09-01-17 14:04:21, Vlastimil Babka wrote: > [...] >>> +static inline unsigned int memalloc_nofs_save(void) >>> +{ >>> + unsigned int flags = current->flags & PF_MEMALLOC_NOFS; >>> + current->flags |= PF_MEMALLOC_NOFS; >> >> So this is not new

Re: [f2fs-dev] [PATCH 2/8] xfs: abstract PF_FSTRANS to PF_MEMALLOC_NOFS

2017-01-09 Thread Vlastimil Babka
On 01/06/2017 03:11 PM, 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. Let's start by giving the flag a > more generic n

Re: [f2fs-dev] [PATCH 2/8] xfs: abstract PF_FSTRANS to PF_MEMALLOC_NOFS

2017-01-09 Thread Michal Hocko
On Mon 09-01-17 13:59:05, Vlastimil Babka wrote: > On 01/06/2017 03:11 PM, 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 filesyste

Re: [f2fs-dev] [PATCH 1/8] lockdep: allow to disable reclaim lockup detection

2017-01-09 Thread Vlastimil Babka
On 01/06/2017 03:11 PM, Michal Hocko wrote: > From: Michal Hocko > > The current implementation of the reclaim lockup detection can lead to > false positives and those even happen and usually lead to tweak the > code to silence the lockdep by using GFP_NOFS even though the context > can use __GFP

Re: [f2fs-dev] [PATCH 3/8] mm: introduce memalloc_nofs_{save, restore} API

2017-01-09 Thread Michal Hocko
On Mon 09-01-17 14:04:21, Vlastimil Babka wrote: [...] > > +static inline unsigned int memalloc_nofs_save(void) > > +{ > > + unsigned int flags = current->flags & PF_MEMALLOC_NOFS; > > + current->flags |= PF_MEMALLOC_NOFS; > > So this is not new, as same goes for memalloc_noio_save, but I've >

[f2fs-dev] Vault open source file & storage conference CFP

2017-01-09 Thread Christoph Hellwig
Hi all, The CFP for the Linux Foundation's Vault conference is coming close to an end. The event is being held this year in Cambridge, Massachusetts on the days following the LSF/MM summit. The first two year's events have been solid, focused events in my (slightly biased) opinion, so worth su

Re: [f2fs-dev] [PATCH 3/5] f2fs: check in-memory block bitmap

2017-01-09 Thread Chao Yu
Hi Jaegeuk, On 2017/1/8 13:02, Jaegeuk Kim wrote: >> @@ -2786,6 +2811,7 @@ static void destroy_sit_info(struct f2fs_sb_info *sbi) >> if (sit_i->sentries) { >> for (start = 0; start < MAIN_SEGS(sbi); start++) { >> kfree(sit_i->sentries[start].cur_valid_map); >