[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 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 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

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 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 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 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 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 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

[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 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 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

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 v4 26/36] um: Implement the new page table range API

2023-03-15 Thread Mike Rapoport
On Wed, Mar 15, 2023 at 05:14:34AM +, Matthew Wilcox (Oracle) wrote: > Add PFN_PTE_SHIFT and update_mmu_cache_range(). > > Signed-off-by: Matthew Wilcox (Oracle) > Cc: Richard Weinberger > Cc: Anton Ivanov > Cc: Johannes Berg > Cc: linux-um@lists.infradead.org Ac

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

2023-02-12 Thread Mike Rapoport
Andrew, On Sun, Feb 12, 2023 at 10:37:15PM -0800, Guenter Roeck wrote: > On 2/12/23 17:26, Mike Rapoport wrote: > > 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: > > >

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 2/4] m68k: use asm-generic/memory_model.h for both MMU and !MMU

2023-02-12 Thread Mike Rapoport
Hi, On Sun, Feb 12, 2023 at 09:35:13AM -0800, Guenter Roeck wrote: > Hi, > > On Sun, Jan 29, 2023 at 02:42:33PM +0200, Mike Rapoport wrote: > > From: "Mike Rapoport (IBM)" > > > > The MMU variant uses generic definitions of page_to_pfn() and > > pfn_

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

2023-02-12 Thread Mike Rapoport
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 > > version of pfn_va

Re: [PATCH v4 04/34] pgtable: Create struct ptdesc

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:03:53PM -0700, Vishal Moola (Oracle) wrote: > Currently, page table information is stored within struct page. As part > of simplifying struct page, create struct ptdesc for page table > information. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mik

Re: [PATCH v4 11/34] mm: Convert pmd_ptlock_free() to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:00PM -0700, Vishal Moola (Oracle) wrote: > This removes some direct accesses to struct page, working towards > splitting out struct ptdesc from struct page. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > inclu

Re: [PATCH v4 15/34] x86: Convert various functions to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:04PM -0700, Vishal Moola (Oracle) wrote: > In order to split struct ptdesc from struct page, convert various > functions to use ptdescs. > > Some of the functions use the *get*page*() helper functions. Convert Nit: *get_free_page*() >

Re: [PATCH v4 25/34] m68k: Convert various functions to use ptdescs

2023-06-14 Thread Mike Rapoport
ons. Convert > these to use pagetable_alloc() and ptdesc_address() instead to help > standardize page tables further. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) One comment below > --- > arch/m68k/include/asm/mcf_pgalloc.h | 41 ++-

Re: [PATCH v4 09/34] mm: Convert pmd_ptlock_init() to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:03:58PM -0700, Vishal Moola (Oracle) wrote: > This removes some direct accesses to struct page, working towards > splitting out struct ptdesc from struct page. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > inclu

Re: [PATCH v4 18/34] mm: Remove page table members from struct page

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:07PM -0700, Vishal Moola (Oracle) wrote: > The page table members are now split out into their own ptdesc struct. > Remove them from struct page. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > include/lin

Re: [PATCH v4 23/34] hexagon: Convert __pte_free_tlb() to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:12PM -0700, Vishal Moola (Oracle) wrote: > Part of the conversions to replace pgtable constructor/destructors with > ptdesc equivalents. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > arch/hexagon/include

Re: [PATCH v4 28/34] openrisc: Convert __pte_free_tlb() to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:17PM -0700, Vishal Moola (Oracle) wrote: > Part of the conversions to replace pgtable constructor/destructors with > ptdesc equivalents. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > arch/openrisc/include

Re: [PATCH v4 02/34] s390: Use _pt_s390_gaddr for gmap address tracking

2023-06-14 Thread Mike Rapoport
d be the right place for that. Otherwise: Acked-by: Mike Rapoport (IBM) > This also reverts commit 7e25de77bc5ea ("s390/mm: use pmd_pgtable_page() > helper in __gmap_segment_gaddr()") which had s390 use > pmd_pgtable_page() to get a gmap page table, as pmd_pgtable_page() &g

Re: [PATCH v4 05/34] mm: add utility functions for ptdesc

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:03:54PM -0700, Vishal Moola (Oracle) wrote: > Introduce utility functions setting the foundation for ptdescs. These > will also assist in the splitting out of ptdesc from struct page. > > Functions that focus on the descriptor are prefixed with ptdesc_* while >

Re: [PATCH v4 34/34] mm: Remove pgtable_{pmd, pte}_page_{ctor, dtor}() wrappers

2023-06-14 Thread Mike Rapoport
ge_ctor arch/riscv/mm/init.c:440: BUG_ON(!vaddr || !pgtable_pmd_page_ctor(virt_to_page(vaddr))); Otherwise Acked-by: Mike Rapoport (IBM) > --- > Documentation/mm/split_page_table_lock.rst| 12 +-- > .../zh_CN/mm/split_page_table_lock.rst| 14 ++---

Re: [PATCH v4 12/34] mm: Convert ptlock_free() to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:01PM -0700, Vishal Moola (Oracle) wrote: > This removes some direct accesses to struct page, working towards > splitting out struct ptdesc from struct page. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > inclu

Re: [PATCH v4 17/34] s390: Convert various pgalloc functions to use ptdescs

2023-06-14 Thread Mike Rapoport
ons. Convert > these to use pagetable_alloc() and ptdesc_address() instead to help > standardize page tables further. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > arch/s390/include/asm/pgalloc.h | 4 +- > arch/s390/include/asm/tlb.h |

Re: [PATCH v4 20/34] arm: Convert various functions to use ptdescs

2023-06-14 Thread Mike Rapoport
ion. Convert > this to use pagetable_alloc() and ptdesc_address() instead to help > standardize page tables further. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) One comment below. > --- > arch/arm/include/asm/tlb.h | 12 +++- >

Re: [PATCH v4 24/34] loongarch: Convert various functions to use ptdescs

2023-06-14 Thread Mike Rapoport
ons. Convert > these to use pagetable_alloc() and ptdesc_address() instead to help > standardize page tables further. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > arch/loongarch/include/asm/pgalloc.h | 27 +++

Re: [PATCH v4 26/34] mips: Convert various functions to use ptdescs

2023-06-14 Thread Mike Rapoport
ons. Convert > these to use pagetable_alloc() and ptdesc_address() instead to help > standardize page tables further. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > arch/mips/include/asm/pgalloc.h | 31 +-- > arc

Re: [PATCH v4 27/34] nios2: Convert __pte_free_tlb() to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:16PM -0700, Vishal Moola (Oracle) wrote: > Part of the conversions to replace pgtable constructor/destructors with > ptdesc equivalents. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > arch/nios2/include

Re: [PATCH v4 08/34] mm: Convert ptlock_ptr() to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:03:57PM -0700, Vishal Moola (Oracle) wrote: > This removes some direct accesses to struct page, working towards > splitting out struct ptdesc from struct page. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > arch/x86

Re: [PATCH v4 07/34] mm: Convert ptlock_alloc() to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:03:56PM -0700, Vishal Moola (Oracle) wrote: > This removes some direct accesses to struct page, working towards > splitting out struct ptdesc from struct page. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > incl

Re: [PATCH v4 06/34] mm: Convert pmd_pgtable_page() to pmd_ptdesc()

2023-06-14 Thread Mike Rapoport
l Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > include/linux/mm.h | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/include/linux/mm.h b/include/linux/mm.h > index f184f1eba85d..088b7664f897 100644 > --- a/include/linux/mm.h > +++ b/in

Re: [PATCH v4 19/34] pgalloc: Convert various functions to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:08PM -0700, Vishal Moola (Oracle) wrote: > As part of the conversions to replace pgtable constructor/destructors with > ptdesc equivalents, convert various page table functions to use ptdescs. > > Some of the functions use the *get*page*() helper functions. Convert >

Re: [PATCH v4 33/34] um: Convert {pmd, pte}_free_tlb() to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:22PM -0700, Vishal Moola (Oracle) wrote: > Part of the conversions to replace pgtable constructor/destructors with > ptdesc equivalents. Also cleans up some spacing issues. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) >

Re: [PATCH v4 32/34] sparc: Convert pgtable_pte_page_{ctor, dtor}() to ptdesc equivalents

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:21PM -0700, Vishal Moola (Oracle) wrote: > Part of the conversions to replace pgtable pte constructor/destructors with > ptdesc equivalents. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > arch/sparc/mm/srmmu.c |

Re: [PATCH v4 03/34] s390: Use pt_frag_refcount for pagetables

2023-06-14 Thread Mike Rapoport
his improves the safety for _refcount and the page table tracking. > > This also allows us to simplify the tracking since we can once again use > the lower byte of pt_frag_refcount instead of the upper byte of _refcount. > > Signed-off-by: Vishal Moola (Oracle) One nit below

Re: [PATCH v4 22/34] csky: Convert __pte_free_tlb() to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:11PM -0700, Vishal Moola (Oracle) wrote: > Part of the conversions to replace pgtable constructor/destructors with > ptdesc equivalents. > > Signed-off-by: Vishal Moola (Oracle) > Acked-by: Guo Ren Acked-by: Mike Rapoport (IBM) > --- >

Re: [PATCH v4 10/34] mm: Convert ptlock_init() to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:03:59PM -0700, Vishal Moola (Oracle) wrote: > This removes some direct accesses to struct page, working towards > splitting out struct ptdesc from struct page. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > inclu

Re: [PATCH v4 13/34] mm: Create ptdesc equivalents for pgtable_{pte,pmd}_page_{ctor,dtor}

2023-06-14 Thread Mike Rapoport
"create ... make" I like the second form more. > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > include/linux/mm.h | 56 ++ > 1 file changed, 42 insertions(+), 14 deletions(-) > > diff --git a/

Re: [PATCH v4 21/34] arm64: Convert various functions to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:10PM -0700, Vishal Moola (Oracle) wrote: > As part of the conversions to replace pgtable constructor/destructors with > ptdesc equivalents, convert various page table functions to use ptdescs. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike R

Re: [PATCH v4 01/34] mm: Add PAGE_TYPE_OP folio functions

2023-06-14 Thread Mike Rapoport
the memory here. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > include/linux/page-flags.h | 20 ++-- > 1 file changed, 18 insertions(+), 2 deletions(-) > > diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h >

Re: [PATCH v4 31/34] sparc64: Convert various functions to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:20PM -0700, Vishal Moola (Oracle) wrote: > As part of the conversions to replace pgtable constructor/destructors with > ptdesc equivalents, convert various page table functions to use ptdescs. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike R

Re: [PATCH v4 30/34] sh: Convert pte_free_tlb() to use ptdescs

2023-06-14 Thread Mike Rapoport
gt; Acked-by: John Paul Adrian Glaubitz Acked-by: Mike Rapoport (IBM) > --- > arch/sh/include/asm/pgalloc.h | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/arch/sh/include/asm/pgalloc.h b/arch/sh/include/asm/pgalloc.h > index a9e98233c4d4.

Re: [PATCH v4 14/34] powerpc: Convert various functions to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:03PM -0700, Vishal Moola (Oracle) wrote: > In order to split struct ptdesc from struct page, convert various > functions to use ptdescs. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > arch/powerpc/mm/book3s64/

Re: [PATCH v4 16/34] s390: Convert various gmap functions to use ptdescs

2023-06-14 Thread Mike Rapoport
ptdesc_address() instead to help > standardize page tables further. > > Signed-off-by: Vishal Moola (Oracle) With folding ptdesc->_pt_s390_gaddr = 0; into pagetable_free() Acked-by: Mike Rapoport (IBM) > --- > arch/s390/mm/gmap.c | 230 -

Re: [PATCH v4 29/34] riscv: Convert alloc_{pmd, pte}_late() to use ptdescs

2023-06-14 Thread Mike Rapoport
ons. Convert > these to use pagetable_alloc() and ptdesc_address() instead to help > standardize page tables further. > > Signed-off-by: Vishal Moola (Oracle) > Acked-by: Palmer Dabbelt Acked-by: Mike Rapoport (IBM) > --- > arch/riscv/include/asm/pgalloc.h | 8

Re: [PATCH v9 01/42] mm: Rename arch pte_mkwrite()'s to pte_mkwrite_novma()

2023-06-13 Thread Mike Rapoport
vger.kernel.org > Cc: linux-um@lists.infradead.org > Cc: linux-a...@vger.kernel.org > Cc: linux...@kvack.org > Suggested-by: Linus Torvalds > Signed-off-by: Rick Edgecombe > Link: > https://lore.kernel.org/lkml/CAHk-=wizjsu7c9sfyzb3q04108stghff2wfbokgccgw7riz...@mail.gmai

Re: [PATCH v2 05/34] mm: add utility functions for ptdesc

2023-05-25 Thread Mike Rapoport
On Mon, May 01, 2023 at 12:28:00PM -0700, Vishal Moola (Oracle) wrote: > Introduce utility functions setting the foundation for ptdescs. These > will also assist in the splitting out of ptdesc from struct page. > > ptdesc_alloc() is defined to allocate new ptdesc pages as compound > pages. This

Re: [PATCH v2 13/34] mm: Create ptdesc equivalents for pgtable_{pte,pmd}_page_{ctor,dtor}

2023-05-25 Thread Mike Rapoport
On Mon, May 01, 2023 at 12:28:08PM -0700, Vishal Moola (Oracle) wrote: > Creates ptdesc_pte_ctor(), ptdesc_pmd_ctor(), ptdesc_pte_dtor(), and > ptdesc_pmd_dtor() and make the original pgtable constructor/destructors > wrappers. I think pgtable_pXY_ctor/dtor names would be better. >

Re: [PATCH v2 01/34] mm: Add PAGE_TYPE_OP folio functions

2023-05-25 Thread Mike Rapoport
Hi, On Mon, May 01, 2023 at 12:27:56PM -0700, Vishal Moola (Oracle) wrote: > No folio equivalents for page type operations have been defined, so > define them for later folio conversions. Can you please elaborate why would we need folios for page table descriptors? > Also changes the

Re: [PATCH v2 02/34] s390: Use _pt_s390_gaddr for gmap address tracking

2023-05-25 Thread Mike Rapoport
On Mon, May 01, 2023 at 12:27:57PM -0700, Vishal Moola (Oracle) wrote: > s390 uses page->index to keep track of page tables for the guest address > space. In an attempt to consolidate the usage of page fields in s390, > replace _pt_pad_2 with _pt_s390_gaddr to replace page->index in gmap. > >

Re: [PATCH v2 05/34] mm: add utility functions for ptdesc

2023-05-27 Thread Mike Rapoport
On Thu, May 25, 2023 at 01:53:24PM -0700, Vishal Moola wrote: > On Thu, May 25, 2023 at 1:26 PM Mike Rapoport wrote: > > > > On Thu, May 25, 2023 at 11:04:28AM -0700, Vishal Moola wrote: > > > On Thu, May 25, 2023 at 2:10 AM Mike Rapoport wrote: > > > > > +

Re: [PATCH v2 05/34] mm: add utility functions for ptdesc

2023-05-27 Thread Mike Rapoport
On Sat, May 27, 2023 at 04:09:31PM +0100, Matthew Wilcox wrote: > On Sat, May 27, 2023 at 01:41:44PM +0300, Mike Rapoport wrote: > > Sorry if I wasn't clear, by "page table page" I meant the page (or memory > > for that matter) for actual page table rather th

Re: [PATCH v2 01/34] mm: Add PAGE_TYPE_OP folio functions

2023-05-25 Thread Mike Rapoport
On Thu, May 25, 2023 at 10:00:23AM -0700, Vishal Moola wrote: > On Thu, May 25, 2023 at 1:56 AM Mike Rapoport wrote: > > > > Hi, > > > > On Mon, May 01, 2023 at 12:27:56PM -0700, Vishal Moola (Oracle) wrote: > > > No folio equivalents for page type operation

Re: [PATCH v2 05/34] mm: add utility functions for ptdesc

2023-05-25 Thread Mike Rapoport
On Thu, May 25, 2023 at 11:04:28AM -0700, Vishal Moola wrote: > On Thu, May 25, 2023 at 2:10 AM Mike Rapoport wrote: > > > + > > > +static inline struct ptdesc *ptdesc_alloc(gfp_t gfp, unsigned int order) > > > +{ > > > + struct page *pag