Re: [f2fs-dev] [PATCH 07/10] mm/filemap: introduce generic_file_*_mmap_prepare() helpers

2025-06-17 Thread Vlastimil Babka
very easily convert > these in advance of converting file systems which use them. > > This patch does so. > > Signed-off-by: Lorenzo Stoakes Acked-by: Vlastimil Babka > --- > include/linux/fs.h | 6 -- > mm/filemap.c | 29 + > 2

Re: [f2fs-dev] [PATCH 02/10] mm/nommu: use file_has_valid_mmap_hooks() helper

2025-06-17 Thread Vlastimil Babka
upporting mmap() by using > the file_has_valid_mmap_hooks() helper function, which checks for either > f_op->mmap or f_op->mmap_prepare rather than checking only for f_op->mmap > directly. > > Signed-off-by: Lorenzo Stoakes Acked-by: Vlastimil Babka > --- > mm/nommu.c | 2

Re: [f2fs-dev] [PATCH 01/10] mm: rename call_mmap/mmap_prepare to vfs_mmap/mmap_prepare

2025-06-17 Thread Vlastimil Babka
he VMA userland tests and ensure the mmap_prepare -> mmap > shim is implemented there. > > Signed-off-by: Lorenzo Stoakes Acked-by: Vlastimil Babka > --- > drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 2 +- > fs/backing-file.c | 2 +- > fs/coda/file.

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
S context. > > Changes since v1 > - s@memalloc_noio_restore@memalloc_nofs_restore@ in _xfs_buf_map_pages > as per Brian Foster > > Signed-off-by: Michal Hocko Not a xfs expert, but seems correct. Acked-by: Vlastimil Babka Nit below: > --- > fs/xfs/kmem.c| 10

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

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

2017-01-09 Thread Vlastimil Babka
rectly > anyway. > > This patch doesn't introduce any functional change. > > Signed-off-by: Michal Hocko > Reviewed-by: Brian Foster Acked-by: Vlastimil Babka A nit: > --- a/include/linux/sched.h > +++ b/include/linux/sched.h > @@ -2320,6 +2320,8 @@ extern void threa

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

2017-01-09 Thread Vlastimil Babka
oblematic places. This would prevent from abusing GFP_NOFS > flag which has a runtime effect even on configurations which have > lockdep disabled. > > Introduce __GFP_NOLOCKDEP flag which tells the lockdep gfp tracking to > skip the current allocation request. > > While we are

Re: [f2fs-dev] [PATCH] mm: introduce kv[mz]alloc helpers

2017-01-06 Thread Vlastimil Babka
On 01/02/2017 02:37 PM, Michal Hocko wrote: > --- a/drivers/vhost/vhost.c > +++ b/drivers/vhost/vhost.c > @@ -514,18 +514,9 @@ long vhost_dev_set_owner(struct vhost_dev *dev) > } > EXPORT_SYMBOL_GPL(vhost_dev_set_owner); > > -static void *vhost_kvzalloc(unsigned long size) > -{ > - void *n

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

2017-01-06 Thread Vlastimil Babka
|= __GFP_NORETRY; I think this would be more understandable for me if it was written in the opposite way, i.e. "if we have costly __GFP_REPEAT allocation, don't use __GFP_NORETRY", but nevermind, seems correct to me wrt current handling of both flags in the page allocator. And it s

Re: [f2fs-dev] [PATCH] mm: introduce kv[mz]alloc helpers

2017-01-06 Thread Vlastimil Babka
gt; return 0; > > /* If XPS was setup, we can allocate memory on right NUMA node */ > - array = fq_alloc_node(sizeof(struct rb_root) << log, > + array = kvmalloc_node(sizeof(struct rb_root) << log, GFP_KERNEL,

Re: [f2fs-dev] [PATCH] mm: introduce kv[mz]alloc helpers

2017-01-05 Thread Vlastimil Babka
e and use > __aa_kvmalloc instead to prevent from the naming clashes. > > Changes since v1 > - define __vmalloc_node_flags for CONFIG_MMU=n > > Cc: Anatoly Stepanov > Cc: Paolo Bonzini > Cc: Mike Snitzer > Cc: "Michael S. Tsirkin" > Cc: "Theodore Ts'