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

2023-01-26 Thread Davidlohr Bueso
On Wed, 25 Jan 2023, Andrew Morton wrote: On Wed, 25 Jan 2023 15:35:49 -0800 Suren Baghdasaryan wrote: vm_flags are among VMA attributes which affect decisions like VMA merging and splitting. Therefore all vm_flags modifications are performed after taking exclusive mmap_lock to prevent

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

2023-01-26 Thread Suren Baghdasaryan
On Thu, Jan 26, 2023 at 5:58 AM Mel Gorman wrote: > > On Wed, Jan 25, 2023 at 03:35:49PM -0800, Suren Baghdasaryan wrote: > > vm_flags are among VMA attributes which affect decisions like VMA merging > > and splitting. Therefore all vm_flags modifications are performed after > > taking exclusive

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

2023-01-26 Thread Mel Gorman
On Wed, Jan 25, 2023 at 03:35:49PM -0800, Suren Baghdasaryan wrote: > vm_flags are among VMA attributes which affect decisions like VMA merging > and splitting. Therefore all vm_flags modifications are performed after > taking exclusive mmap_lock to prevent vm_flags updates racing with such >

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

2023-01-26 Thread Michal Hocko
On Wed 25-01-23 15:35:49, Suren Baghdasaryan wrote: > vm_flags are among VMA attributes which affect decisions like VMA merging > and splitting. Therefore all vm_flags modifications are performed after > taking exclusive mmap_lock to prevent vm_flags updates racing with such > operations.

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

2023-01-26 Thread Michal Hocko
On Wed 25-01-23 16:56:17, Suren Baghdasaryan wrote: > On Wed, Jan 25, 2023 at 4:28 PM Andrew Morton > wrote: > > > > On Wed, 25 Jan 2023 15:35:49 -0800 Suren Baghdasaryan > > wrote: > > > > > --- a/include/linux/mm_types.h > > > +++ b/include/linux/mm_types.h > > > @@ -491,7 +491,15 @@ struct

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

2023-01-25 Thread Suren Baghdasaryan
On Wed, Jan 25, 2023 at 4:28 PM Andrew Morton wrote: > > On Wed, 25 Jan 2023 15:35:49 -0800 Suren Baghdasaryan > wrote: > > > --- a/include/linux/mm_types.h > > +++ b/include/linux/mm_types.h > > @@ -491,7 +491,15 @@ struct vm_area_struct { > >* See vmf_insert_mixed_prot() for

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

2023-01-25 Thread Suren Baghdasaryan
On Wed, Jan 25, 2023 at 4:24 PM Andrew Morton wrote: > > On Wed, 25 Jan 2023 15:35:49 -0800 Suren Baghdasaryan > wrote: > > > vm_flags are among VMA attributes which affect decisions like VMA merging > > and splitting. Therefore all vm_flags modifications are performed after > > taking

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

2023-01-25 Thread Andrew Morton
On Wed, 25 Jan 2023 15:35:49 -0800 Suren Baghdasaryan wrote: > --- a/include/linux/mm_types.h > +++ b/include/linux/mm_types.h > @@ -491,7 +491,15 @@ struct vm_area_struct { >* See vmf_insert_mixed_prot() for discussion. >*/ > pgprot_t vm_page_prot; > - unsigned long

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

2023-01-25 Thread Andrew Morton
On Wed, 25 Jan 2023 15:35:49 -0800 Suren Baghdasaryan wrote: > vm_flags are among VMA attributes which affect decisions like VMA merging > and splitting. Therefore all vm_flags modifications are performed after > taking exclusive mmap_lock to prevent vm_flags updates racing with such >

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

2023-01-25 Thread Suren Baghdasaryan
vm_flags are among VMA attributes which affect decisions like VMA merging and splitting. Therefore all vm_flags modifications are performed after taking exclusive mmap_lock to prevent vm_flags updates racing with such operations. Introduce modifier functions for vm_flags to be used whenever flags