Re: [PATCH v2 4/4] mm, arch: add generic implementation of pfn_valid() for FLATMEM

2023-02-12 Thread Mike Rapoport
Hi Guenter, On Sun, Feb 12, 2023 at 08:13:20AM -0800, Guenter Roeck wrote: > On Sun, Jan 29, 2023 at 02:42:35PM +0200, Mike Rapoport wrote: > > From: "Mike Rapoport (IBM)" > > > > Every architecture that supports FLATMEM memory model defines its own > > ve

Re: [PATCH v2 4/4] mm, arch: add generic implementation of pfn_valid() for FLATMEM

2023-02-12 Thread Mike Rapoport
Hi Guenter, On Sun, Feb 12, 2023 at 08:13:20AM -0800, Guenter Roeck wrote: > On Sun, Jan 29, 2023 at 02:42:35PM +0200, Mike Rapoport wrote: > > From: "Mike Rapoport (IBM)" > > > > Every architecture that supports FLATMEM memory model defines its own > > ve

Re: [PATCH v2 4/4] mm, arch: add generic implementation of pfn_valid() for FLATMEM

2023-02-12 Thread Mike Rapoport
Hi Guenter, On Sun, Feb 12, 2023 at 08:13:20AM -0800, Guenter Roeck wrote: > On Sun, Jan 29, 2023 at 02:42:35PM +0200, Mike Rapoport wrote: > > From: "Mike Rapoport (IBM)" > > > > Every architecture that supports FLATMEM memory model defines its own > > ve

[PATCH 2/2] char/agp: introduce asm-generic/agp.h

2023-02-12 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" There are several architectures that duplicate definitions of map_page_into_agp(), unmap_page_from_agp() and flush_agp_cache(). Define those in asm-generic/agp.h and use it instead of duplicated per-architecture headers. Signed-off-by: Mike Rapoport (IBM)

[PATCH 1/2] char/agp: consolidate {alloc,free}_gatt_pages()

2023-02-12 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" There is a copy of alloc_gatt_pages() and free_gatt_pages in several architectures in arch/$ARCH/include/asm/agp.h. All the copies do exactly the same: alias alloc_gatt_pages() to __get_free_pages(GFP_KERNEL) and alias free_gatt_pages() to free_pages(

[PATCH 0/2] char/agp: consolidate asm/agp.h

2023-02-12 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" Hi, asm/agp.h is duplicated in several architectures, with x86 being the only instance that differs from the rest. Introduce asm-generic/agp.h and use it instead of per-architecture headers for the most cases. I believe that asm-generic is the best tree

[PATCH 2/2] char/agp: introduce asm-generic/agp.h

2023-02-12 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" There are several architectures that duplicate definitions of map_page_into_agp(), unmap_page_from_agp() and flush_agp_cache(). Define those in asm-generic/agp.h and use it instead of duplicated per-architecture headers. Signed-off-by: Mike Rapoport (IBM)

[PATCH 1/2] char/agp: consolidate {alloc,free}_gatt_pages()

2023-02-12 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" There is a copy of alloc_gatt_pages() and free_gatt_pages in several architectures in arch/$ARCH/include/asm/agp.h. All the copies do exactly the same: alias alloc_gatt_pages() to __get_free_pages(GFP_KERNEL) and alias free_gatt_pages() to free_pages(

[PATCH 0/2] char/agp: consolidate asm/agp.h

2023-02-12 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" Hi, asm/agp.h is duplicated in several architectures, with x86 being the only instance that differs from the rest. Introduce asm-generic/agp.h and use it instead of per-architecture headers for the most cases. I believe that asm-generic is the best tree

Re: [Intel-gfx] [PATCH v2 1/6] mm: introduce vma->vm_flags modifier functions

2023-02-02 Thread Mike Rapoport
On Thu, Jan 26, 2023 at 11:17:09AM +0200, Mike Rapoport wrote: > On Wed, Jan 25, 2023 at 12:38:46AM -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 a

Re: [Intel-gfx] [PATCH v2 4/6] mm: replace vma->vm_flags indirect modification in ksm_madvise

2023-02-02 Thread Mike Rapoport
t > vm_flags modification attempts. > > Signed-off-by: Suren Baghdasaryan Acked-by: Mike Rapoport (IBM) > --- > arch/powerpc/kvm/book3s_hv_uvmem.c | 5 - > arch/s390/mm/gmap.c| 5 - > mm/khugepaged.c| 2 ++ > mm/ksm.c

Re: [Intel-gfx] [PATCH v2 6/6] mm: export dump_mm()

2023-02-02 Thread Mike Rapoport
m() function. > > Signed-off-by: Suren Baghdasaryan Acked-by: Mike Rapoport (IBM) > --- > mm/debug.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/mm/debug.c b/mm/debug.c > index 9d3d893dc7f4..96d594e16292 100644 > --- a/mm/debug.c > +++ b/mm/debug.c >

Re: [Intel-gfx] [PATCH v2 2/6] mm: replace VM_LOCKED_CLEAR_MASK with VM_LOCKED_MASK

2023-02-02 Thread Mike Rapoport
On Wed, Jan 25, 2023 at 12:38:47AM -0800, Suren Baghdasaryan wrote: > To simplify the usage of VM_LOCKED_CLEAR_MASK in clear_vm_flags(), > replace it with VM_LOCKED_MASK bitmask and convert all users. > > Signed-off-by: Suren Baghdasaryan Acked-by: Mike Rapoport (IBM) > --- &

Re: [Intel-gfx] [PATCH v2 1/6] mm: introduce vma->vm_flags modifier functions

2023-02-02 Thread Mike Rapoport
rea_struct *vma, > + unsigned long flags) I'd suggest to make it vm_flags_init() etc. Except that Acked-by: Mike Rapoport (IBM) > +{ > + vma->vm_flags = flags; > +} > + > +/* Use when VMA is part of the VMA tree and modif

Re: [Intel-gfx] [PATCH v2 5/6] mm: introduce mod_vm_flags_nolock and use it in untrack_pfn

2023-02-02 Thread Mike Rapoport
On Wed, Jan 25, 2023 at 12:38:50AM -0800, Suren Baghdasaryan wrote: > In cases when VMA flags are modified after VMA was isolated and mmap_lock > was downgraded, flags modifications would result in an assertion because > mmap write lock is not held. > Introduce mod_vm_flags_nolock to be used in

Re: [Intel-gfx] [PATCH v2 3/6] mm: replace vma->vm_flags direct modifications with modifier calls

2023-02-02 Thread Mike Rapoport
On Wed, Jan 25, 2023 at 12:38:48AM -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:

Re: [PATCH v2 4/4] mm, arch: add generic implementation of pfn_valid() for FLATMEM

2023-01-31 Thread Mike Rapoport
Hi Conor, On Tue, Jan 31, 2023 at 05:47:24PM +, Conor Dooley wrote: > Hey Mike, > > On Sun, Jan 29, 2023 at 02:42:35PM +0200, Mike Rapoport wrote: > > From: "Mike Rapoport (IBM)" > > > > Every architecture that supports FLATMEM memory model def

Re: [PATCH v2 4/4] mm, arch: add generic implementation of pfn_valid() for FLATMEM

2023-01-31 Thread Mike Rapoport
Hi Conor, On Tue, Jan 31, 2023 at 05:47:24PM +, Conor Dooley wrote: > Hey Mike, > > On Sun, Jan 29, 2023 at 02:42:35PM +0200, Mike Rapoport wrote: > > From: "Mike Rapoport (IBM)" > > > > Every architecture that supports FLATMEM memory model def

Re: [PATCH v2 4/4] mm, arch: add generic implementation of pfn_valid() for FLATMEM

2023-01-31 Thread Mike Rapoport
Hi Conor, On Tue, Jan 31, 2023 at 05:47:24PM +, Conor Dooley wrote: > Hey Mike, > > On Sun, Jan 29, 2023 at 02:42:35PM +0200, Mike Rapoport wrote: > > From: "Mike Rapoport (IBM)" > > > > Every architecture that supports FLATMEM memory model def

[PATCH v2 4/4] mm, arch: add generic implementation of pfn_valid() for FLATMEM

2023-01-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" Every architecture that supports FLATMEM memory model defines its own version of pfn_valid() that essentially compares a pfn to max_mapnr. Use mips/powerpc version implemented as static inline as a generic implementation of pfn_valid() and drop its per-ar

[PATCH v2 3/4] mips: drop definition of pfn_valid() for DISCONTIGMEM

2023-01-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" There is stale definition of pfn_valid() for DISCONTINGMEM memory model guarded !FLATMEM && !SPARSEMEM && NUMA ifdefery. Remove everything but definition of pfn_valid() for FLATMEM. Signed-off-by: Mike Rapoport (IBM) --- arch/mi

[PATCH v2 2/4] m68k: use asm-generic/memory_model.h for both MMU and !MMU

2023-01-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" The MMU variant uses generic definitions of page_to_pfn() and pfn_to_page(), but !MMU defines them in include/asm/page_no.h for no good reason. Include asm-generic/memory_model.h in the common include/asm/page.h and drop redundant definitions. Signed-of

[PATCH v2 4/4] mm, arch: add generic implementation of pfn_valid() for FLATMEM

2023-01-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" Every architecture that supports FLATMEM memory model defines its own version of pfn_valid() that essentially compares a pfn to max_mapnr. Use mips/powerpc version implemented as static inline as a generic implementation of pfn_valid() and drop its per-ar

[PATCH v2 4/4] mm, arch: add generic implementation of pfn_valid() for FLATMEM

2023-01-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" Every architecture that supports FLATMEM memory model defines its own version of pfn_valid() that essentially compares a pfn to max_mapnr. Use mips/powerpc version implemented as static inline as a generic implementation of pfn_valid() and drop its per-ar

[PATCH v2 3/4] mips: drop definition of pfn_valid() for DISCONTIGMEM

2023-01-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" There is stale definition of pfn_valid() for DISCONTINGMEM memory model guarded !FLATMEM && !SPARSEMEM && NUMA ifdefery. Remove everything but definition of pfn_valid() for FLATMEM. Signed-off-by: Mike Rapoport (IBM) --- arch/mi

[PATCH v2 3/4] mips: drop definition of pfn_valid() for DISCONTIGMEM

2023-01-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" There is stale definition of pfn_valid() for DISCONTINGMEM memory model guarded !FLATMEM && !SPARSEMEM && NUMA ifdefery. Remove everything but definition of pfn_valid() for FLATMEM. Signed-off-by: Mike Rapoport (IBM) --- arch/mi

[PATCH v2 1/4] arm: include asm-generic/memory_model.h from page.h rather than memory.h

2023-01-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" Makes it consistent with other architectures and allows for generic definition of pfn_valid() in asm-generic/memory_model.h with clear override in arch/arm/include/asm/page.h Signed-off-by: Mike Rapoport (IBM) --- arch/arm/include/asm/memory.h | 2 --

[PATCH v2 2/4] m68k: use asm-generic/memory_model.h for both MMU and !MMU

2023-01-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" The MMU variant uses generic definitions of page_to_pfn() and pfn_to_page(), but !MMU defines them in include/asm/page_no.h for no good reason. Include asm-generic/memory_model.h in the common include/asm/page.h and drop redundant definitions. Signed-of

[PATCH v2 2/4] m68k: use asm-generic/memory_model.h for both MMU and !MMU

2023-01-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" The MMU variant uses generic definitions of page_to_pfn() and pfn_to_page(), but !MMU defines them in include/asm/page_no.h for no good reason. Include asm-generic/memory_model.h in the common include/asm/page.h and drop redundant definitions. Signed-of

[PATCH v2 1/4] arm: include asm-generic/memory_model.h from page.h rather than memory.h

2023-01-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" Makes it consistent with other architectures and allows for generic definition of pfn_valid() in asm-generic/memory_model.h with clear override in arch/arm/include/asm/page.h Signed-off-by: Mike Rapoport (IBM) --- arch/arm/include/asm/memory.h | 2 --

[PATCH v2 1/4] arm: include asm-generic/memory_model.h from page.h rather than memory.h

2023-01-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" Makes it consistent with other architectures and allows for generic definition of pfn_valid() in asm-generic/memory_model.h with clear override in arch/arm/include/asm/page.h Signed-off-by: Mike Rapoport (IBM) --- arch/arm/include/asm/memory.h | 2 --

[PATCH v2 0/4] mm, arch: add generic implementation of pfn_valid() for FLATMEM

2023-01-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" Hi, Every architecture that supports FLATMEM memory model defines its own version of pfn_valid() that essentially compares a pfn to max_mapnr. Use mips/powerpc version implemented as static inline as a generic implementation of pfn_valid() and dr

[PATCH v2 0/4] mm, arch: add generic implementation of pfn_valid() for FLATMEM

2023-01-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" Hi, Every architecture that supports FLATMEM memory model defines its own version of pfn_valid() that essentially compares a pfn to max_mapnr. Use mips/powerpc version implemented as static inline as a generic implementation of pfn_valid() and dr

[PATCH v2 0/4] mm, arch: add generic implementation of pfn_valid() for FLATMEM

2023-01-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" Hi, Every architecture that supports FLATMEM memory model defines its own version of pfn_valid() that essentially compares a pfn to max_mapnr. Use mips/powerpc version implemented as static inline as a generic implementation of pfn_valid() and dr

Re: [PATCH v2 6/6] mm: export dump_mm()

2023-01-27 Thread Mike Rapoport
m() function. > > Signed-off-by: Suren Baghdasaryan Acked-by: Mike Rapoport (IBM) > --- > mm/debug.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/mm/debug.c b/mm/debug.c > index 9d3d893dc7f4..96d594e16292 100644 > --- a/mm/debug.c > +++ b/mm/debug.c >

Re: [PATCH v2 1/6] mm: introduce vma->vm_flags modifier functions

2023-01-27 Thread Mike Rapoport
On Thu, Jan 26, 2023 at 11:17:09AM +0200, Mike Rapoport wrote: > On Wed, Jan 25, 2023 at 12:38:46AM -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 a

Re: [PATCH v2 1/6] mm: introduce vma->vm_flags modifier functions

2023-01-26 Thread Mike Rapoport
On Thu, Jan 26, 2023 at 11:17:09AM +0200, Mike Rapoport wrote: > On Wed, Jan 25, 2023 at 12:38:46AM -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 a

Re: [PATCH v2 6/6] mm: export dump_mm()

2023-01-26 Thread Mike Rapoport
m() function. > > Signed-off-by: Suren Baghdasaryan Acked-by: Mike Rapoport (IBM) > --- > mm/debug.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/mm/debug.c b/mm/debug.c > index 9d3d893dc7f4..96d594e16292 100644 > --- a/mm/debug.c > +++ b/mm/debug.c >

Re: [PATCH v2 2/6] mm: replace VM_LOCKED_CLEAR_MASK with VM_LOCKED_MASK

2023-01-26 Thread Mike Rapoport
On Wed, Jan 25, 2023 at 12:38:47AM -0800, Suren Baghdasaryan wrote: > To simplify the usage of VM_LOCKED_CLEAR_MASK in clear_vm_flags(), > replace it with VM_LOCKED_MASK bitmask and convert all users. > > Signed-off-by: Suren Baghdasaryan Acked-by: Mike Rapoport (IBM) > --- &

Re: [PATCH v2 1/6] mm: introduce vma->vm_flags modifier functions

2023-01-26 Thread Mike Rapoport
On Thu, Jan 26, 2023 at 11:17:09AM +0200, Mike Rapoport wrote: > On Wed, Jan 25, 2023 at 12:38:46AM -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 a

Re: [PATCH v2 6/6] mm: export dump_mm()

2023-01-26 Thread Mike Rapoport
m() function. > > Signed-off-by: Suren Baghdasaryan Acked-by: Mike Rapoport (IBM) > --- > mm/debug.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/mm/debug.c b/mm/debug.c > index 9d3d893dc7f4..96d594e16292 100644 > --- a/mm/debug.c > +++ b/mm/debug.c >

Re: [PATCH v2 4/6] mm: replace vma->vm_flags indirect modification in ksm_madvise

2023-01-26 Thread Mike Rapoport
t > vm_flags modification attempts. > > Signed-off-by: Suren Baghdasaryan Acked-by: Mike Rapoport (IBM) > --- > arch/powerpc/kvm/book3s_hv_uvmem.c | 5 - > arch/s390/mm/gmap.c| 5 - > mm/khugepaged.c| 2 ++ > mm/ksm.c

Re: [PATCH v2 5/6] mm: introduce mod_vm_flags_nolock and use it in untrack_pfn

2023-01-26 Thread Mike Rapoport
On Wed, Jan 25, 2023 at 12:38:50AM -0800, Suren Baghdasaryan wrote: > In cases when VMA flags are modified after VMA was isolated and mmap_lock > was downgraded, flags modifications would result in an assertion because > mmap write lock is not held. > Introduce mod_vm_flags_nolock to be used in

Re: [PATCH v2 3/6] mm: replace vma->vm_flags direct modifications with modifier calls

2023-01-26 Thread Mike Rapoport
On Wed, Jan 25, 2023 at 12:38:48AM -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:

Re: [PATCH v2 1/6] mm: introduce vma->vm_flags modifier functions

2023-01-26 Thread Mike Rapoport
rea_struct *vma, > + unsigned long flags) I'd suggest to make it vm_flags_init() etc. Except that Acked-by: Mike Rapoport (IBM) > +{ > + vma->vm_flags = flags; > +} > + > +/* Use when VMA is part of the VMA tree and modif

Re: [PATCH v4 6/7] mm: introduce __vm_flags_mod and use it in untrack_pfn

2023-01-26 Thread Mike Rapoport
t; Acked-by: Michal Hocko Acked-by: Mike Rapoport (IBM) > --- > arch/x86/mm/pat/memtype.c | 10 +++--- > include/linux/mm.h| 14 -- > include/linux/pgtable.h | 5 +++-- > mm/memory.c | 13 +++-- > mm/memremap.c

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

2023-01-26 Thread Mike Rapoport
Michal Hocko > Acked-by: Mel Gorman Acked-by: Mike Rapoport (IBM) > --- > include/linux/mm.h | 40 > include/linux/mm_types.h | 10 +- > 2 files changed, 49 insertions(+), 1 deletion(-) > > diff --git a/include/l

Re: [PATCH v4 1/7] kernel/fork: convert vma assignment to a memcpy

2023-01-26 Thread Mike Rapoport
On Thu, Jan 26, 2023 at 11:37:46AM -0800, Suren Baghdasaryan wrote: > Convert vma assignment in vm_area_dup() to a memcpy() to prevent compiler > errors when we add a const modifier to vma->vm_flags. > > Signed-off-by: Suren Baghdasaryan > Acked-by: Mel Gorman Acked-by:

Re: [PATCH v2 1/6] mm: introduce vma->vm_flags modifier functions

2023-01-26 Thread Mike Rapoport
On Thu, Jan 26, 2023 at 11:17:09AM +0200, Mike Rapoport wrote: > On Wed, Jan 25, 2023 at 12:38:46AM -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 a

Re: [PATCH v2 2/6] mm: replace VM_LOCKED_CLEAR_MASK with VM_LOCKED_MASK

2023-01-26 Thread Mike Rapoport
On Wed, Jan 25, 2023 at 12:38:47AM -0800, Suren Baghdasaryan wrote: > To simplify the usage of VM_LOCKED_CLEAR_MASK in clear_vm_flags(), > replace it with VM_LOCKED_MASK bitmask and convert all users. > > Signed-off-by: Suren Baghdasaryan Acked-by: Mike Rapoport (IBM) > --- &

Re: [PATCH v2 5/6] mm: introduce mod_vm_flags_nolock and use it in untrack_pfn

2023-01-26 Thread Mike Rapoport
On Wed, Jan 25, 2023 at 12:38:50AM -0800, Suren Baghdasaryan wrote: > In cases when VMA flags are modified after VMA was isolated and mmap_lock > was downgraded, flags modifications would result in an assertion because > mmap write lock is not held. > Introduce mod_vm_flags_nolock to be used in

Re: [PATCH v2 4/6] mm: replace vma->vm_flags indirect modification in ksm_madvise

2023-01-26 Thread Mike Rapoport
t > vm_flags modification attempts. > > Signed-off-by: Suren Baghdasaryan Acked-by: Mike Rapoport (IBM) > --- > arch/powerpc/kvm/book3s_hv_uvmem.c | 5 - > arch/s390/mm/gmap.c| 5 - > mm/khugepaged.c| 2 ++ > mm/ksm.c

Re: [PATCH v2 3/6] mm: replace vma->vm_flags direct modifications with modifier calls

2023-01-26 Thread Mike Rapoport
On Wed, Jan 25, 2023 at 12:38:48AM -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:

Re: [PATCH v2 1/6] mm: introduce vma->vm_flags modifier functions

2023-01-26 Thread Mike Rapoport
rea_struct *vma, > + unsigned long flags) I'd suggest to make it vm_flags_init() etc. Except that Acked-by: Mike Rapoport (IBM) > +{ > + vma->vm_flags = flags; > +} > + > +/* Use when VMA is part of the VMA tree and modif

Re: [PATCH v2 6/6] mm: export dump_mm()

2023-01-26 Thread Mike Rapoport
m() function. > > Signed-off-by: Suren Baghdasaryan Acked-by: Mike Rapoport (IBM) > --- > mm/debug.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/mm/debug.c b/mm/debug.c > index 9d3d893dc7f4..96d594e16292 100644 > --- a/mm/debug.c > +++ b/mm/debug.c >

Re: [Freedreno] [PATCH v2 1/6] mm: introduce vma->vm_flags modifier functions

2023-01-26 Thread Mike Rapoport
On Thu, Jan 26, 2023 at 11:17:09AM +0200, Mike Rapoport wrote: > On Wed, Jan 25, 2023 at 12:38:46AM -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 a

Re: [Freedreno] [PATCH v2 6/6] mm: export dump_mm()

2023-01-26 Thread Mike Rapoport
m() function. > > Signed-off-by: Suren Baghdasaryan Acked-by: Mike Rapoport (IBM) > --- > mm/debug.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/mm/debug.c b/mm/debug.c > index 9d3d893dc7f4..96d594e16292 100644 > --- a/mm/debug.c > +++ b/mm/debug.c >

Re: [PATCH v2 1/6] mm: introduce vma->vm_flags modifier functions

2023-01-26 Thread Mike Rapoport
On Thu, Jan 26, 2023 at 11:17:09AM +0200, Mike Rapoport wrote: > On Wed, Jan 25, 2023 at 12:38:46AM -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 a

Re: [PATCH v2 1/6] mm: introduce vma->vm_flags modifier functions

2023-01-26 Thread Mike Rapoport
On Thu, Jan 26, 2023 at 11:17:09AM +0200, Mike Rapoport wrote: > On Wed, Jan 25, 2023 at 12:38:46AM -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 a

Re: [PATCH v2 6/6] mm: export dump_mm()

2023-01-26 Thread Mike Rapoport
m() function. > > Signed-off-by: Suren Baghdasaryan Acked-by: Mike Rapoport (IBM) > --- > mm/debug.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/mm/debug.c b/mm/debug.c > index 9d3d893dc7f4..96d594e16292 100644 > --- a/mm/debug.c > +++ b/mm/debug.c >

Re: [PATCH v2 6/6] mm: export dump_mm()

2023-01-26 Thread Mike Rapoport
m() function. > > Signed-off-by: Suren Baghdasaryan Acked-by: Mike Rapoport (IBM) > --- > mm/debug.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/mm/debug.c b/mm/debug.c > index 9d3d893dc7f4..96d594e16292 100644 > --- a/mm/debug.c > +++ b/mm/debug.c >

Re: [Freedreno] [PATCH v2 3/6] mm: replace vma->vm_flags direct modifications with modifier calls

2023-01-26 Thread Mike Rapoport
On Wed, Jan 25, 2023 at 12:38:48AM -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:

Re: [Freedreno] [PATCH v2 4/6] mm: replace vma->vm_flags indirect modification in ksm_madvise

2023-01-26 Thread Mike Rapoport
t > vm_flags modification attempts. > > Signed-off-by: Suren Baghdasaryan Acked-by: Mike Rapoport (IBM) > --- > arch/powerpc/kvm/book3s_hv_uvmem.c | 5 - > arch/s390/mm/gmap.c| 5 - > mm/khugepaged.c| 2 ++ > mm/ksm.c

Re: [Freedreno] [PATCH v2 1/6] mm: introduce vma->vm_flags modifier functions

2023-01-26 Thread Mike Rapoport
rea_struct *vma, > + unsigned long flags) I'd suggest to make it vm_flags_init() etc. Except that Acked-by: Mike Rapoport (IBM) > +{ > + vma->vm_flags = flags; > +} > + > +/* Use when VMA is part of the VMA tree and modif

Re: [Freedreno] [PATCH v2 2/6] mm: replace VM_LOCKED_CLEAR_MASK with VM_LOCKED_MASK

2023-01-26 Thread Mike Rapoport
On Wed, Jan 25, 2023 at 12:38:47AM -0800, Suren Baghdasaryan wrote: > To simplify the usage of VM_LOCKED_CLEAR_MASK in clear_vm_flags(), > replace it with VM_LOCKED_MASK bitmask and convert all users. > > Signed-off-by: Suren Baghdasaryan Acked-by: Mike Rapoport (IBM) > --- &

Re: [Freedreno] [PATCH v2 5/6] mm: introduce mod_vm_flags_nolock and use it in untrack_pfn

2023-01-26 Thread Mike Rapoport
On Wed, Jan 25, 2023 at 12:38:50AM -0800, Suren Baghdasaryan wrote: > In cases when VMA flags are modified after VMA was isolated and mmap_lock > was downgraded, flags modifications would result in an assertion because > mmap write lock is not held. > Introduce mod_vm_flags_nolock to be used in

Re: [PATCH v2 5/6] mm: introduce mod_vm_flags_nolock and use it in untrack_pfn

2023-01-26 Thread Mike Rapoport
On Wed, Jan 25, 2023 at 12:38:50AM -0800, Suren Baghdasaryan wrote: > In cases when VMA flags are modified after VMA was isolated and mmap_lock > was downgraded, flags modifications would result in an assertion because > mmap write lock is not held. > Introduce mod_vm_flags_nolock to be used in

Re: [PATCH v2 4/6] mm: replace vma->vm_flags indirect modification in ksm_madvise

2023-01-26 Thread Mike Rapoport
t > vm_flags modification attempts. > > Signed-off-by: Suren Baghdasaryan Acked-by: Mike Rapoport (IBM) > --- > arch/powerpc/kvm/book3s_hv_uvmem.c | 5 - > arch/s390/mm/gmap.c| 5 - > mm/khugepaged.c| 2 ++ > mm/ksm.c

Re: [PATCH v2 5/6] mm: introduce mod_vm_flags_nolock and use it in untrack_pfn

2023-01-26 Thread Mike Rapoport
On Wed, Jan 25, 2023 at 12:38:50AM -0800, Suren Baghdasaryan wrote: > In cases when VMA flags are modified after VMA was isolated and mmap_lock > was downgraded, flags modifications would result in an assertion because > mmap write lock is not held. > Introduce mod_vm_flags_nolock to be used in

Re: [PATCH v2 4/6] mm: replace vma->vm_flags indirect modification in ksm_madvise

2023-01-26 Thread Mike Rapoport
t > vm_flags modification attempts. > > Signed-off-by: Suren Baghdasaryan Acked-by: Mike Rapoport (IBM) > --- > arch/powerpc/kvm/book3s_hv_uvmem.c | 5 - > arch/s390/mm/gmap.c| 5 - > mm/khugepaged.c| 2 ++ > mm/ksm.c

Re: [PATCH v2 3/6] mm: replace vma->vm_flags direct modifications with modifier calls

2023-01-26 Thread Mike Rapoport
On Wed, Jan 25, 2023 at 12:38:48AM -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:

Re: [PATCH v2 2/6] mm: replace VM_LOCKED_CLEAR_MASK with VM_LOCKED_MASK

2023-01-26 Thread Mike Rapoport
On Wed, Jan 25, 2023 at 12:38:47AM -0800, Suren Baghdasaryan wrote: > To simplify the usage of VM_LOCKED_CLEAR_MASK in clear_vm_flags(), > replace it with VM_LOCKED_MASK bitmask and convert all users. > > Signed-off-by: Suren Baghdasaryan Acked-by: Mike Rapoport (IBM) > --- &

Re: [PATCH v2 1/6] mm: introduce vma->vm_flags modifier functions

2023-01-26 Thread Mike Rapoport
rea_struct *vma, > + unsigned long flags) I'd suggest to make it vm_flags_init() etc. Except that Acked-by: Mike Rapoport (IBM) > +{ > + vma->vm_flags = flags; > +} > + > +/* Use when VMA is part of the VMA tree and modif

Re: [LSF/MM/BPF proposal]: Physr discussion

2023-01-26 Thread Mike Rapoport
On Mon, Jan 23, 2023 at 04:36:25AM +, Matthew Wilcox wrote: > On Sat, Jan 21, 2023 at 11:03:05AM -0400, Jason Gunthorpe wrote: > > I would like to have a session at LSF to talk about Matthew's > > physr discussion starter: > > > >

Re: [PATCH v2 5/6] mm: introduce mod_vm_flags_nolock and use it in untrack_pfn

2023-01-26 Thread Mike Rapoport
On Wed, Jan 25, 2023 at 12:38:50AM -0800, Suren Baghdasaryan wrote: > In cases when VMA flags are modified after VMA was isolated and mmap_lock > was downgraded, flags modifications would result in an assertion because > mmap write lock is not held. > Introduce mod_vm_flags_nolock to be used in

Re: [PATCH v2 5/6] mm: introduce mod_vm_flags_nolock and use it in untrack_pfn

2023-01-26 Thread Mike Rapoport
On Wed, Jan 25, 2023 at 12:38:50AM -0800, Suren Baghdasaryan wrote: > In cases when VMA flags are modified after VMA was isolated and mmap_lock > was downgraded, flags modifications would result in an assertion because > mmap write lock is not held. > Introduce mod_vm_flags_nolock to be used in

Re: [PATCH v2 4/6] mm: replace vma->vm_flags indirect modification in ksm_madvise

2023-01-26 Thread Mike Rapoport
t > vm_flags modification attempts. > > Signed-off-by: Suren Baghdasaryan Acked-by: Mike Rapoport (IBM) > --- > arch/powerpc/kvm/book3s_hv_uvmem.c | 5 - > arch/s390/mm/gmap.c| 5 - > mm/khugepaged.c| 2 ++ > mm/ksm.c

Re: [PATCH v2 4/6] mm: replace vma->vm_flags indirect modification in ksm_madvise

2023-01-26 Thread Mike Rapoport
t > vm_flags modification attempts. > > Signed-off-by: Suren Baghdasaryan Acked-by: Mike Rapoport (IBM) > --- > arch/powerpc/kvm/book3s_hv_uvmem.c | 5 - > arch/s390/mm/gmap.c| 5 - > mm/khugepaged.c| 2 ++ > mm/ksm.c

Re: [PATCH v2 3/6] mm: replace vma->vm_flags direct modifications with modifier calls

2023-01-26 Thread Mike Rapoport
On Wed, Jan 25, 2023 at 12:38:48AM -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:

Re: [PATCH v2 3/6] mm: replace vma->vm_flags direct modifications with modifier calls

2023-01-26 Thread Mike Rapoport
On Wed, Jan 25, 2023 at 12:38:48AM -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:

Re: [PATCH v2 2/6] mm: replace VM_LOCKED_CLEAR_MASK with VM_LOCKED_MASK

2023-01-26 Thread Mike Rapoport
On Wed, Jan 25, 2023 at 12:38:47AM -0800, Suren Baghdasaryan wrote: > To simplify the usage of VM_LOCKED_CLEAR_MASK in clear_vm_flags(), > replace it with VM_LOCKED_MASK bitmask and convert all users. > > Signed-off-by: Suren Baghdasaryan Acked-by: Mike Rapoport (IBM) > --- &

Re: [PATCH v2 1/6] mm: introduce vma->vm_flags modifier functions

2023-01-26 Thread Mike Rapoport
rea_struct *vma, > + unsigned long flags) I'd suggest to make it vm_flags_init() etc. Except that Acked-by: Mike Rapoport (IBM) > +{ > + vma->vm_flags = flags; > +} > + > +/* Use when VMA is part of the VMA tree and modif

Re: [PATCH v2 2/6] mm: replace VM_LOCKED_CLEAR_MASK with VM_LOCKED_MASK

2023-01-26 Thread Mike Rapoport
On Wed, Jan 25, 2023 at 12:38:47AM -0800, Suren Baghdasaryan wrote: > To simplify the usage of VM_LOCKED_CLEAR_MASK in clear_vm_flags(), > replace it with VM_LOCKED_MASK bitmask and convert all users. > > Signed-off-by: Suren Baghdasaryan Acked-by: Mike Rapoport (IBM) > --- &

Re: [PATCH v2 3/6] mm: replace vma->vm_flags direct modifications with modifier calls

2023-01-26 Thread Mike Rapoport
On Wed, Jan 25, 2023 at 12:38:48AM -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:

Re: [PATCH v2 2/6] mm: replace VM_LOCKED_CLEAR_MASK with VM_LOCKED_MASK

2023-01-26 Thread Mike Rapoport
On Wed, Jan 25, 2023 at 12:38:47AM -0800, Suren Baghdasaryan wrote: > To simplify the usage of VM_LOCKED_CLEAR_MASK in clear_vm_flags(), > replace it with VM_LOCKED_MASK bitmask and convert all users. > > Signed-off-by: Suren Baghdasaryan Acked-by: Mike Rapoport (IBM) > --- &

Re: [PATCH v2 1/6] mm: introduce vma->vm_flags modifier functions

2023-01-26 Thread Mike Rapoport
rea_struct *vma, > + unsigned long flags) I'd suggest to make it vm_flags_init() etc. Except that Acked-by: Mike Rapoport (IBM) > +{ > + vma->vm_flags = flags; > +} > + > +/* Use when VMA is part of the VMA tree and modif

Re: [PATCH v2 1/6] mm: introduce vma->vm_flags modifier functions

2023-01-26 Thread Mike Rapoport
rea_struct *vma, > + unsigned long flags) I'd suggest to make it vm_flags_init() etc. Except that Acked-by: Mike Rapoport (IBM) > +{ > + vma->vm_flags = flags; > +} > + > +/* Use when VMA is part of the VMA tree and modif

[PATCH 3/3] mm, arch: add generic implementation of pfn_valid() for FLATMEM

2023-01-25 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" Every architecture that supports FLATMEM memory model defines its own version of pfn_valid() that essentially compares a pfn to max_mapnr. Use mips/powerpc version implemented as static inline as a generic implementation of pfn_valid() and drop its per-ar

[PATCH 2/3] mips: drop definition of pfn_valid() for DISCONTIGMEM

2023-01-25 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" There is stale definition of pfn_valid() for DISCONTINGMEM memory model guarded !FLATMEM && !SPARSEMEM && NUMA ifdefery. Remove everything but definition of pfn_valid() for FLATMEM. Signed-off-by: Mike Rapoport (IBM) --- arch/mi

[PATCH 1/3] m68k: use asm-generic/memory_model.h for both MMU and !MMU

2023-01-25 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" The MMU variant uses generic definitions of page_to_pfn() and pfn_to_page(), but !MMU defines them in include/asm/page_no.h for no good reason. Include asm-generic/memory_model.h in the common include/asm/page.h and drop redundant definitions. Signed-of

[PATCH 3/3] mm, arch: add generic implementation of pfn_valid() for FLATMEM

2023-01-25 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" Every architecture that supports FLATMEM memory model defines its own version of pfn_valid() that essentially compares a pfn to max_mapnr. Use mips/powerpc version implemented as static inline as a generic implementation of pfn_valid() and drop its per-ar

[PATCH 3/3] mm, arch: add generic implementation of pfn_valid() for FLATMEM

2023-01-25 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" Every architecture that supports FLATMEM memory model defines its own version of pfn_valid() that essentially compares a pfn to max_mapnr. Use mips/powerpc version implemented as static inline as a generic implementation of pfn_valid() and drop its per-ar

[PATCH 0/3] mm, arch: add generic implementation of pfn_valid() for FLATMEM

2023-01-25 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" Hi, Every architecture that supports FLATMEM memory model defines its own version of pfn_valid() that essentially compares a pfn to max_mapnr. Use mips/powerpc version implemented as static inline as a generic implementation of pfn_valid() and dr

[PATCH 2/3] mips: drop definition of pfn_valid() for DISCONTIGMEM

2023-01-25 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" There is stale definition of pfn_valid() for DISCONTINGMEM memory model guarded !FLATMEM && !SPARSEMEM && NUMA ifdefery. Remove everything but definition of pfn_valid() for FLATMEM. Signed-off-by: Mike Rapoport (IBM) --- arch/mi

[PATCH 2/3] mips: drop definition of pfn_valid() for DISCONTIGMEM

2023-01-25 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" There is stale definition of pfn_valid() for DISCONTINGMEM memory model guarded !FLATMEM && !SPARSEMEM && NUMA ifdefery. Remove everything but definition of pfn_valid() for FLATMEM. Signed-off-by: Mike Rapoport (IBM) --- arch/mi

[PATCH 1/3] m68k: use asm-generic/memory_model.h for both MMU and !MMU

2023-01-25 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" The MMU variant uses generic definitions of page_to_pfn() and pfn_to_page(), but !MMU defines them in include/asm/page_no.h for no good reason. Include asm-generic/memory_model.h in the common include/asm/page.h and drop redundant definitions. Signed-of

[PATCH 1/3] m68k: use asm-generic/memory_model.h for both MMU and !MMU

2023-01-25 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" The MMU variant uses generic definitions of page_to_pfn() and pfn_to_page(), but !MMU defines them in include/asm/page_no.h for no good reason. Include asm-generic/memory_model.h in the common include/asm/page.h and drop redundant definitions. Signed-of

[PATCH 0/3] mm, arch: add generic implementation of pfn_valid() for FLATMEM

2023-01-25 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" Hi, Every architecture that supports FLATMEM memory model defines its own version of pfn_valid() that essentially compares a pfn to max_mapnr. Use mips/powerpc version implemented as static inline as a generic implementation of pfn_valid() and dr

[PATCH 0/3] mm, arch: add generic implementation of pfn_valid() for FLATMEM

2023-01-25 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" Hi, Every architecture that supports FLATMEM memory model defines its own version of pfn_valid() that essentially compares a pfn to max_mapnr. Use mips/powerpc version implemented as static inline as a generic implementation of pfn_valid() and dr

[LincolnTalk] Lincoln Public Library Weekly Update - January 25, 2023

2023-01-25 Thread Robin Rapoport
Judy Polumbaum and Katie Ives. Recording available here. <https://youtu.be/xA68P0wuXLw> YouTube recording March 7, 2022 An Evening with Sybrina Fulton: Cultivating Justice toward Racial Equality <https://lincolnpl.assabetinteractive.com/calendar/an-evening-with-sybrina-fulton/> *. *Yo

<    3   4   5   6   7   8   9   10   11   12   >