Re: [PATCH] mm/slab: rename CONFIG_SLAB to CONFIG_SLAB_DEPRECATED

2023-05-23 Thread Hyeonggon Yoo
nfig SLAB > + bool > + default y > + depends on SLAB_DEPRECATED > + > config SLUB_TINY > bool "Configure SLUB for minimal memory footprint" > depends on SLUB && EXPERT > -- > 2.40.1 Thank you for the work! It looks good to me. let's see some users raise their voice. Acked-by: Hyeonggon Yoo <42.hye...@gmail.com>

Re: [PATCH v4 4/7] mm: replace vma->vm_flags direct modifications with modifier calls

2023-01-31 Thread Hyeonggon Yoo
On Thu, Jan 26, 2023 at 11:37:49AM -0800, Suren Baghdasaryan wrote: > Replace direct modifications to vma->vm_flags with calls to modifier > functions to be able to track flag changes and to keep vma locking > correctness. > > Signed-off-by: Suren Baghdasaryan > Acked-by: Michal Hocko > Acked-by

Re: [PATCH v4 4/7] mm: replace vma->vm_flags direct modifications with modifier calls

2023-02-01 Thread Hyeonggon Yoo
On Tue, Jan 31, 2023 at 10:54:22AM -0800, Suren Baghdasaryan wrote: > On Tue, Jan 31, 2023 at 12:32 AM Hyeonggon Yoo <42.hye...@gmail.com> wrote: > > > > On Thu, Jan 26, 2023 at 11:37:49AM -0800, Suren Baghdasaryan wrote: > > > Replace direct modifications to vma-&g

Re: [PATCH 1/1] mm: introduce vm_flags_reset_once to replace WRITE_ONCE vm_flags updates

2023-02-07 Thread Hyeonggon Yoo
th > modifier calls") > Reported-by: Hyeonggon Yoo <42.hye...@gmail.com> > Signed-off-by: Suren Baghdasaryan > --- > Notes: > - The patch applies cleanly over mm-unstable > - The SHA in Fixes: line is from mm-unstable, so is... unstable > > include/linux/mm.h | 7 ++

Re: [PATCH v4 2/7] mm: introduce vma->vm_flags wrapper functions

2023-02-07 Thread Hyeonggon Yoo
modify use vm_flags_{init|reset|set|clear|mod} functions. > + */ > + union { > + const vm_flags_t vm_flags; > + vm_flags_t __private __vm_flags; > + }; > > /* >* For areas with an address space and backing store, Reviewed-by: Hyeonggon Yoo <42.hye...@gmail.com> > -- > 2.39.1 > >

Re: [PATCH v4 5/7] mm: replace vma->vm_flags indirect modification in ksm_madvise

2023-02-07 Thread Hyeonggon Yoo
; > + MADV_UNMERGEABLE, &vm_flags); > if (ret) > return ret; > + vm_flags_reset(vma, vm_flags); > } > mm->def_flags &= ~VM_MERGEABLE; > return 0; > -- Reviewed-by: Hyeonggon Yoo <42.hye...@gmail.com> > 2.39.1 > >

Re: [PATCH v3 26/35] mm: fall back to mmap_lock if vma->anon_vma is not yet set

2023-02-17 Thread Hyeonggon Yoo
On Fri, Feb 17, 2023 at 11:15 AM Suren Baghdasaryan wrote: > > On Thu, Feb 16, 2023 at 11:43 AM Suren Baghdasaryan wrote: > > > > On Thu, Feb 16, 2023 at 7:44 AM Matthew Wilcox wrote: > > > > > > On Wed, Feb 15, 2023 at 09:17:41PM -0800, Suren Baghdasaryan wrote: > > > > When vma->anon_vma is no

Re: [PATCH v3 26/35] mm: fall back to mmap_lock if vma->anon_vma is not yet set

2023-02-17 Thread Hyeonggon Yoo
On Fri, Feb 17, 2023 at 08:13:01AM -0800, Suren Baghdasaryan wrote: > On Fri, Feb 17, 2023 at 2:21 AM Hyeonggon Yoo <42.hye...@gmail.com> wrote: > > > > On Fri, Feb 17, 2023 at 11:15 AM Suren Baghdasaryan > > wrote: > > > > > > On Thu, Feb 16, 2023

Re: [PATCH v3 16/35] mm/mmap: write-lock VMAs before merging, splitting or expanding them

2023-02-23 Thread Hyeonggon Yoo
On Wed, Feb 15, 2023 at 09:17:31PM -0800, Suren Baghdasaryan wrote: > Decisions about whether VMAs can be merged, split or expanded must be > made while VMAs are protected from the changes which can affect that > decision. For example, merge_vma uses vma->anon_vma in its decision Did you mean vma_

Re: [PATCH v3 16/35] mm/mmap: write-lock VMAs before merging, splitting or expanding them

2023-02-23 Thread Hyeonggon Yoo
On Thu, Feb 23, 2023 at 02:51:27PM +, Hyeonggon Yoo wrote: > On Wed, Feb 15, 2023 at 09:17:31PM -0800, Suren Baghdasaryan wrote: > > Decisions about whether VMAs can be merged, split or expanded must be > > made while VMAs are protected from the changes which can affect that &g

Re: [PATCH v4 17/33] mm/mremap: write-lock VMA while remapping it to a new address range

2023-02-28 Thread Hyeonggon Yoo
@ -623,6 +623,7 @@ static unsigned long move_vma(struct vm_area_struct *vma, > return -ENOMEM; > } > > + vma_start_write(vma); > new_pgoff = vma->vm_pgoff + ((old_addr - vma->vm_start) >> PAGE_SHIFT); > new_vma = copy_vma(&vma, new_addr, new_len

Re: [PATCH v4 18/33] mm: write-lock VMAs before removing them from VMA tree

2023-02-28 Thread Hyeonggon Yoo
On Mon, Feb 27, 2023 at 09:36:17AM -0800, Suren Baghdasaryan wrote: > Write-locking VMAs before isolating them ensures that page fault > handlers don't operate on isolated VMAs. > > Signed-off-by: Suren Baghdasaryan > --- > mm/mmap.c | 1 + > mm/nommu.c | 5 + > 2 files changed, 6 insertion

Re: [PATCH v4 18/33] mm: write-lock VMAs before removing them from VMA tree

2023-02-28 Thread Hyeonggon Yoo
On Wed, Mar 01, 2023 at 07:43:33AM +, Hyeonggon Yoo wrote: > On Mon, Feb 27, 2023 at 09:36:17AM -0800, Suren Baghdasaryan wrote: > > Write-locking VMAs before isolating them ensures that page fault > > handlers don't operate on isolated VMAs. > > > > S

Re: [PATCH v4 24/33] mm: fall back to mmap_lock if vma->anon_vma is not yet set

2023-03-01 Thread Hyeonggon Yoo
as which are not locked */ > + if (!vma->anon_vma) > + goto inval; > + > if (!vma_start_read(vma)) > goto inval; Reviewed-by: Hyeonggon Yoo <42.hye...@gmail.com> > -- > 2.39.2.722.g9855ee24e9-goog > >

Re: [PATCH v4 18/33] mm: write-lock VMAs before removing them from VMA tree

2023-03-01 Thread Hyeonggon Yoo
On Wed, Mar 01, 2023 at 10:42:48AM -0800, Suren Baghdasaryan wrote: > On Wed, Mar 1, 2023 at 10:34 AM Suren Baghdasaryan wrote: > > > > On Tue, Feb 28, 2023 at 11:57 PM Hyeonggon Yoo <42.hye...@gmail.com> wrote: > > > > > > On Wed, Mar 01, 2023 at 07:43:33AM

Re: [PATCH 41/41] mm: replace rw_semaphore with atomic_t in vma_lock

2023-01-16 Thread Hyeonggon Yoo
On Mon, Jan 09, 2023 at 12:53:36PM -0800, Suren Baghdasaryan wrote: > diff --git a/include/linux/mm.h b/include/linux/mm.h > index d40bf8a5e19e..294dd44b2198 100644 > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -627,12 +627,16 @@ static inline void vma_write_lock(struct vm_area_struct