Re: [PATCH mm-unstable v9 14/31] s390: Convert various pgalloc functions to use ptdescs

2023-10-13 Thread Vishal Moola
On Thu, Oct 12, 2023 at 12:25 AM Heiko Carstens wrote: > > On Mon, Aug 07, 2023 at 04:04:56PM -0700, Vishal Moola (Oracle) wrote: > > As part of the conversions to replace pgtable constructor/destructors with > > ptdesc equivalents, convert various page table functi

Re: [PATCH 01/33] s390: Use _pt_s390_gaddr for gmap address tracking

2023-04-20 Thread Vishal Moola
On Wed, Apr 19, 2023 at 12:54 AM David Hildenbrand wrote: > > On 18.04.23 23:33, Vishal Moola wrote: > > On Tue, Apr 18, 2023 at 8:45 AM David Hildenbrand wrote: > >> > >> On 17.04.23 22:50, Vishal Moola (Oracle) wrote: > >>> s390 uses page->ind

Re: [PATCH 01/33] s390: Use _pt_s390_gaddr for gmap address tracking

2023-04-19 Thread Vishal Moola
On Tue, Apr 18, 2023 at 8:45 AM David Hildenbrand wrote: > > On 17.04.23 22:50, 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,

Re: [PATCH 4/33] mm: add utility functions for ptdesc

2023-04-19 Thread Vishal Moola
On Wed, Apr 19, 2023 at 6:34 AM Vernon Yang wrote: > > On Mon, Apr 17, 2023 at 01:50:19PM -0700, Vishal Moola wrote: > > Introduce utility functions setting the foundation for ptdescs. These > > will also assist in the splitting out of ptdesc from struct page. > > >

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

2023-06-01 Thread Vishal Moola
On Thu, Jun 1, 2023 at 6:19 AM Gerald Schaefer wrote: > > On Wed, 31 May 2023 14:30:01 -0700 > "Vishal Moola (Oracle)" wrote: > > > s390 currently uses _refcount to identify fragmented page tables. > > The page table struct already has a member pt_frag_refcount

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

2023-05-25 Thread Vishal Moola
On Thu, May 25, 2023 at 2:19 AM Mike Rapoport wrote: > > 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 &

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

2023-05-25 Thread Vishal Moola
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 operations have been defined, so > > define them for later folio conversions. > > Can you

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

2023-05-25 Thread Vishal Moola
On Thu, May 25, 2023 at 1:58 AM Mike Rapoport wrote: > > 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

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

2023-05-25 Thread Vishal Moola
On Thu, May 25, 2023 at 2:10 AM Mike Rapoport wrote: > > 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. &g

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

2023-06-01 Thread Vishal Moola
On Thu, Jun 1, 2023 at 12:28 AM John Paul Adrian Glaubitz wrote: > > Hi Geert! > > On Thu, 2023-06-01 at 09:20 +0200, Geert Uytterhoeven wrote: > > On Wed, May 31, 2023 at 11:33 PM Vishal Moola (Oracle) > > wrote: > > > Part of the conversions to replac

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

2023-06-01 Thread Vishal Moola
On Thu, Jun 1, 2023 at 12:40 AM Geert Uytterhoeven wrote: > > Hi Vishal, > > On Wed, May 31, 2023 at 11:32 PM Vishal Moola (Oracle) > wrote: > > As part of the conversions to replace pgtable constructor/destructors with > > ptdesc equivalents, convert various page tab

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

2023-05-25 Thread Vishal Moola
On Thu, May 25, 2023 at 1:20 PM Mike Rapoport wrote: > > 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 -070

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

2023-05-25 Thread Vishal Moola
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: > > > > + > > > > +static inline struct ptdesc *ptdesc_alloc(gf

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

2023-06-20 Thread Vishal Moola
On Fri, Jun 16, 2023 at 5:38 AM Jason Gunthorpe wrote: > > 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 tab

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

2023-06-20 Thread Vishal Moola
On Tue, Jun 20, 2023 at 4:05 PM Jason Gunthorpe wrote: > > On Tue, Jun 20, 2023 at 01:01:39PM -0700, Vishal Moola wrote: > > On Fri, Jun 16, 2023 at 5:38 AM Jason Gunthorpe wrote: > > > > > > On Mon, Jun 12, 2023 at 02:03:53PM -0700, Vishal Moola (Oracle) wrote:

Re: [PATCH v5 26/33] nios2: Convert __pte_free_tlb() to use ptdescs

2023-06-27 Thread Vishal Moola
On Tue, Jun 27, 2023 at 12:14 PM Guenter Roeck wrote: > > On 6/27/23 12:10, Guenter Roeck wrote: > > On 6/27/23 10:42, Vishal Moola wrote: > >> On Mon, Jun 26, 2023 at 10:47 PM Guenter Roeck wrote: > >>> > >>> On Thu, Jun 22, 2023 at 01:57:38PM -0

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

2023-06-16 Thread Vishal Moola
On Thu, Jun 15, 2023 at 12:57 AM Hugh Dickins wrote: > > On Mon, 12 Jun 2023, 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 > > info

Re: [PATCH v5 26/33] nios2: Convert __pte_free_tlb() to use ptdescs

2023-06-27 Thread Vishal Moola
On Mon, Jun 26, 2023 at 10:47 PM Guenter Roeck wrote: > > On Thu, Jun 22, 2023 at 01:57:38PM -0700, Vishal Moola (Oracle) wrote: > > Part of the conversions to replace pgtable constructor/destructors with > > ptdesc equivalents. > > > > Signed-off-by: Vishal Mool

Re: [PATCH v6 03/33] pgtable: Create struct ptdesc

2023-06-27 Thread Vishal Moola
On Tue, Jun 27, 2023 at 9:07 AM Peter Xu wrote: > > On Mon, Jun 26, 2023 at 08:14:01PM -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 tab

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

2023-05-15 Thread Vishal Moola
On Sat, May 6, 2023 at 4:35 AM John Paul Adrian Glaubitz wrote: > > Hi Vishal! > > On Mon, 2023-05-01 at 12:28 -0700, Vishal Moola (Oracle) wrote: > > Part of the conversions to replace pgtable constructor/destructors with > > ptdesc equivalents. Also cleans up some spacin

[PATCH 03/33] pgtable: Create struct ptdesc

2023-04-19 Thread Vishal Moola (Oracle)
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) --- include/linux/pgtable.h | 50 + 1 file changed, 50 insertions

[PATCH 11/33] mm: Convert ptlock_free() to use ptdescs

2023-04-19 Thread Vishal Moola (Oracle)
This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Signed-off-by: Vishal Moola (Oracle) --- include/linux/mm.h | 10 +- mm/memory.c| 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/linux

[PATCH 13/33] powerpc: Convert various functions to use ptdescs

2023-04-19 Thread Vishal Moola (Oracle)
In order to split struct ptdesc from struct page, convert various functions to use ptdescs. Signed-off-by: Vishal Moola (Oracle) --- arch/powerpc/mm/book3s64/mmu_context.c | 10 +++--- arch/powerpc/mm/book3s64/pgtable.c | 32 +- arch/powerpc/mm/pgtable-frag.c | 46

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

2023-04-19 Thread Vishal Moola (Oracle)
These functions are no longer necessary. Remove them and cleanup Documentation referencing them. Signed-off-by: Vishal Moola (Oracle) --- Documentation/mm/split_page_table_lock.rst| 12 +-- .../zh_CN/mm/split_page_table_lock.rst| 14 ++--- include/linux/mm.h

[PATCH 31/33] sparc: Convert pgtable_pte_page_{ctor, dtor}() to ptdesc equivalents

2023-04-19 Thread Vishal Moola (Oracle)
Part of the conversions to replace pgtable pte constructor/destructors with ptdesc equivalents. Signed-off-by: Vishal Moola (Oracle) --- arch/sparc/mm/srmmu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index

[PATCH 12/33] mm: Create ptdesc equivalents for pgtable_{pte,pmd}_page_{ctor,dtor}

2023-04-19 Thread Vishal Moola (Oracle)
Creates ptdesc_pte_ctor(), ptdesc_pmd_ctor(), ptdesc_pte_dtor(), and ptdesc_pmd_dtor() and make the original pgtable constructor/destructors wrappers. Signed-off-by: Vishal Moola (Oracle) --- include/linux/mm.h | 56 ++ 1 file changed, 42 insertions

[PATCH 10/33] mm: Convert pmd_ptlock_free() to use ptdescs

2023-04-19 Thread Vishal Moola (Oracle)
This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Signed-off-by: Vishal Moola (Oracle) --- include/linux/mm.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h

[PATCH 21/33] csky: Convert __pte_free_tlb() to use ptdescs

2023-04-19 Thread Vishal Moola (Oracle)
Part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents. Signed-off-by: Vishal Moola (Oracle) --- arch/csky/include/asm/pgalloc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/csky/include/asm/pgalloc.h b/arch/csky/include/asm

[PATCH 23/33] loongarch: Convert various functions to use ptdescs

2023-04-19 Thread Vishal Moola (Oracle)
page tables further. Signed-off-by: Vishal Moola (Oracle) --- arch/loongarch/include/asm/pgalloc.h | 27 +++ arch/loongarch/mm/pgtable.c | 7 --- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/arch/loongarch/include/asm/pgalloc.h b/arch

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

2023-04-19 Thread Vishal Moola (Oracle)
Part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents. Also cleans up some spacing issues. Signed-off-by: Vishal Moola (Oracle) --- arch/um/include/asm/pgalloc.h | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/um

[PATCH 00/33] Split ptdesc from struct page

2023-04-19 Thread Vishal Moola (Oracle)
happen. This series is rebased on next-20230417. Vishal Moola (Oracle) (33): s390: Use _pt_s390_gaddr for gmap address tracking s390: Use pt_frag_refcount for pagetables pgtable: Create struct ptdesc mm: add utility functions for ptdesc mm: Convert pmd_pgtable_page() to pmd_ptdesc() mm

[PATCH 01/33] s390: Use _pt_s390_gaddr for gmap address tracking

2023-04-19 Thread Vishal Moola (Oracle)
s well as allow s390 to use _pt_frag_refcount for fragmented page table tracking. Since page->_pt_s390_gaddr aliases with mapping, ensure its set to NULL before freeing the pages as well. Signed-off-by: Vishal Moola (Oracle) --- arch/s390/mm/gmap.c | 50 +++-

[PATCH 02/33] s390: Use pt_frag_refcount for pagetables

2023-04-19 Thread Vishal Moola (Oracle)
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) --- arch/s390/mm/pgalloc.c | 38 +++--- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git

[PATCH 14/33] x86: Convert various functions to use ptdescs

2023-04-19 Thread Vishal Moola (Oracle)
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 these to use ptdesc_alloc() and ptdesc_address() instead to help standardize page tables further. Signed-off-by: Vishal Moola (Oracle

[PATCH 15/33] s390: Convert various gmap functions to use ptdescs

2023-04-19 Thread Vishal Moola (Oracle)
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 these to use ptdesc_alloc() and ptdesc_address() instead to help standardize page tables further. Signed-off-by: Vishal Moola (Oracle

[PATCH 29/33] sh: Convert pte_free_tlb() to use ptdescs

2023-04-19 Thread Vishal Moola (Oracle)
Part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents. Also cleans up some spacing issues. Signed-off-by: Vishal Moola (Oracle) --- arch/sh/include/asm/pgalloc.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/sh/include/asm

[PATCH 27/33] openrisc: Convert __pte_free_tlb() to use ptdescs

2023-04-19 Thread Vishal Moola (Oracle)
Part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents. Signed-off-by: Vishal Moola (Oracle) --- arch/openrisc/include/asm/pgalloc.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/openrisc/include/asm/pgalloc.h b/arch

[PATCH 06/33] mm: Convert ptlock_alloc() to use ptdescs

2023-04-19 Thread Vishal Moola (Oracle)
This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Signed-off-by: Vishal Moola (Oracle) --- include/linux/mm.h | 6 +++--- mm/memory.c| 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/mm.h

[PATCH 18/33] pgalloc: Convert various functions to use ptdescs

2023-04-19 Thread Vishal Moola (Oracle)
page tables further. Signed-off-by: Vishal Moola (Oracle) --- include/asm-generic/pgalloc.h | 62 +-- 1 file changed, 37 insertions(+), 25 deletions(-) diff --git a/include/asm-generic/pgalloc.h b/include/asm-generic/pgalloc.h index a7cf825befae..7d4a1f5d3c17 100644

[PATCH 25/33] mips: Convert various functions to use ptdescs

2023-04-19 Thread Vishal Moola (Oracle)
page tables further. Signed-off-by: Vishal Moola (Oracle) --- arch/mips/include/asm/pgalloc.h | 31 +-- arch/mips/mm/pgtable.c | 7 --- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/arch/mips/include/asm/pgalloc.h b/arch/mips/include/asm

[PATCH 30/33] sparc64: Convert various functions to use ptdescs

2023-04-19 Thread Vishal Moola (Oracle)
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) --- arch/sparc/mm/init_64.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff

[PATCH 04/33] mm: add utility functions for ptdesc

2023-04-19 Thread Vishal Moola (Oracle)
, in contrast to 2 allocation and 2 free functions. Signed-off-by: Vishal Moola (Oracle) --- include/asm-generic/tlb.h | 11 ++ include/linux/mm.h| 44 +++ include/linux/pgtable.h | 13 3 files changed, 68 insertions(+) diff --git

[PATCH 05/33] mm: Convert pmd_pgtable_page() to pmd_ptdesc()

2023-04-19 Thread Vishal Moola (Oracle)
Converts pmd_pgtable_page() to pmd_ptdesc() and all its callers. This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Signed-off-by: Vishal Moola (Oracle) --- include/linux/mm.h | 8 1 file changed, 4 insertions(+), 4 deletions

[PATCH 07/33] mm: Convert ptlock_ptr() to use ptdescs

2023-04-19 Thread Vishal Moola (Oracle)
This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Signed-off-by: Vishal Moola (Oracle) --- arch/x86/xen/mmu_pv.c | 2 +- include/linux/mm.h| 14 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch

[PATCH 08/33] mm: Convert pmd_ptlock_init() to use ptdescs

2023-04-19 Thread Vishal Moola (Oracle)
This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Signed-off-by: Vishal Moola (Oracle) --- include/linux/mm.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h

[PATCH 20/33] arm64: Convert various functions to use ptdescs

2023-04-19 Thread Vishal Moola (Oracle)
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) --- arch/arm64/include/asm/tlb.h | 14 -- arch/arm64/mm/mmu.c | 7 --- 2 files

[PATCH 19/33] arm: Convert various functions to use ptdescs

2023-04-19 Thread Vishal Moola (Oracle)
page tables further. Signed-off-by: Vishal Moola (Oracle) --- arch/arm/include/asm/tlb.h | 12 +++- arch/arm/mm/mmu.c | 6 +++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/arch/arm/include/asm/tlb.h b/arch/arm/include/asm/tlb.h index b8cbe03ad260

[PATCH 28/33] riscv: Convert alloc_{pmd, pte}_late() to use ptdescs

2023-04-19 Thread Vishal Moola (Oracle)
page tables further. Signed-off-by: Vishal Moola (Oracle) --- arch/riscv/include/asm/pgalloc.h | 8 arch/riscv/mm/init.c | 16 ++-- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/arch/riscv/include/asm/pgalloc.h b/arch/riscv/include/asm/pgalloc.h

[PATCH 26/33] nios2: Convert __pte_free_tlb() to use ptdescs

2023-04-19 Thread Vishal Moola (Oracle)
Part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents. Signed-off-by: Vishal Moola (Oracle) --- arch/nios2/include/asm/pgalloc.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/nios2/include/asm/pgalloc.h b/arch/nios2/include

[PATCH 09/33] mm: Convert ptlock_init() to use ptdescs

2023-04-19 Thread Vishal Moola (Oracle)
This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Signed-off-by: Vishal Moola (Oracle) --- include/linux/mm.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h

[PATCH 17/33] mm: Remove page table members from struct page

2023-04-19 Thread Vishal Moola (Oracle)
The page table members are now split out into their own ptdesc struct. Remove them from struct page. Signed-off-by: Vishal Moola (Oracle) --- include/linux/mm_types.h | 14 -- include/linux/pgtable.h | 3 --- 2 files changed, 17 deletions(-) diff --git a/include/linux/mm_types.h

[PATCH 16/33] s390: Convert various pgalloc functions to use ptdescs

2023-04-19 Thread Vishal Moola (Oracle)
page tables further. Signed-off-by: Vishal Moola (Oracle) --- arch/s390/include/asm/pgalloc.h | 4 +- arch/s390/include/asm/tlb.h | 4 +- arch/s390/mm/pgalloc.c | 108 3 files changed, 59 insertions(+), 57 deletions(-) diff --git a/arch/s390/include

[PATCH 22/33] hexagon: Convert __pte_free_tlb() to use ptdescs

2023-04-19 Thread Vishal Moola (Oracle)
Part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents. Signed-off-by: Vishal Moola (Oracle) --- arch/hexagon/include/asm/pgalloc.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/hexagon/include/asm/pgalloc.h b/arch/hexagon

[PATCH 24/33] m68k: Convert various functions to use ptdescs

2023-04-19 Thread Vishal Moola (Oracle)
page tables further. Signed-off-by: Vishal Moola (Oracle) --- arch/m68k/include/asm/mcf_pgalloc.h | 41 ++-- arch/m68k/include/asm/sun3_pgalloc.h | 8 +++--- arch/m68k/mm/motorola.c | 4 +-- 3 files changed, 27 insertions(+), 26 deletions(-) diff --git a/arch

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

2023-05-01 Thread Vishal Moola (Oracle)
This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Signed-off-by: Vishal Moola (Oracle) --- include/linux/mm.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h

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

2023-05-01 Thread Vishal Moola (Oracle)
This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Signed-off-by: Vishal Moola (Oracle) --- include/linux/mm.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h

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

2023-05-01 Thread Vishal Moola (Oracle)
This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Signed-off-by: Vishal Moola (Oracle) --- include/linux/mm.h | 10 +- mm/memory.c| 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/linux

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

2023-05-01 Thread Vishal Moola (Oracle)
Creates ptdesc_pte_ctor(), ptdesc_pmd_ctor(), ptdesc_pte_dtor(), and ptdesc_pmd_dtor() and make the original pgtable constructor/destructors wrappers. Signed-off-by: Vishal Moola (Oracle) --- include/linux/mm.h | 56 ++ 1 file changed, 42 insertions

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

2023-05-01 Thread Vishal Moola (Oracle)
, in contrast to 2 allocation and 2 free functions. Signed-off-by: Vishal Moola (Oracle) --- include/asm-generic/tlb.h | 11 ++ include/linux/mm.h| 44 +++ include/linux/pgtable.h | 12 +++ 3 files changed, 67 insertions(+) diff --git

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

2023-05-01 Thread Vishal Moola (Oracle)
Converts pmd_pgtable_page() to pmd_ptdesc() and all its callers. This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Signed-off-by: Vishal Moola (Oracle) --- include/linux/mm.h | 8 1 file changed, 4 insertions(+), 4 deletions

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

2023-05-01 Thread Vishal Moola (Oracle)
Part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents. Signed-off-by: Vishal Moola (Oracle) --- arch/csky/include/asm/pgalloc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/csky/include/asm/pgalloc.h b/arch/csky/include/asm

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

2023-05-01 Thread Vishal Moola (Oracle)
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) --- arch/arm64/include/asm/tlb.h | 14 -- arch/arm64/mm/mmu.c | 7 --- 2 files

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

2023-05-01 Thread Vishal Moola (Oracle)
ot;) which had s390 use pmd_pgtable_page() to get a gmap page table, as pmd_pgtable_page() should be used for more generic process page tables. Signed-off-by: Vishal Moola (Oracle) --- arch/s390/mm/gmap.c | 56 +++- include/linux/mm_types.h | 2 +-

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

2023-05-01 Thread Vishal Moola (Oracle)
No folio equivalents for page type operations have been defined, so define them for later folio conversions. Also changes the Page##uname macros to take in const struct page* since we only read the memory here. Signed-off-by: Vishal Moola (Oracle) --- include/linux/page-flags.h | 20

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

2023-05-01 Thread Vishal Moola (Oracle)
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 these to use ptdesc_alloc() and ptdesc_address() instead to help standardize page tables further. Signed-off-by: Vishal Moola (Oracle

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

2023-05-01 Thread Vishal Moola (Oracle)
page tables further. Signed-off-by: Vishal Moola (Oracle) --- arch/s390/include/asm/pgalloc.h | 4 +- arch/s390/include/asm/tlb.h | 4 +- arch/s390/mm/pgalloc.c | 108 3 files changed, 59 insertions(+), 57 deletions(-) diff --git a/arch/s390/include

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

2023-05-01 Thread Vishal Moola (Oracle)
These functions are no longer necessary. Remove them and cleanup Documentation referencing them. Signed-off-by: Vishal Moola (Oracle) --- Documentation/mm/split_page_table_lock.rst| 12 +-- .../zh_CN/mm/split_page_table_lock.rst| 14 ++--- include/linux/mm.h

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

2023-05-01 Thread Vishal Moola (Oracle)
Part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents. Also cleans up some spacing issues. Signed-off-by: Vishal Moola (Oracle) --- arch/um/include/asm/pgalloc.h | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/um

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

2023-05-01 Thread Vishal Moola (Oracle)
This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Signed-off-by: Vishal Moola (Oracle) --- arch/x86/xen/mmu_pv.c | 2 +- include/linux/mm.h| 14 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch

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

2023-05-01 Thread Vishal Moola (Oracle)
This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Signed-off-by: Vishal Moola (Oracle) --- include/linux/mm.h | 6 +++--- mm/memory.c| 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/mm.h

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

2023-05-01 Thread Vishal Moola (Oracle)
This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Signed-off-by: Vishal Moola (Oracle) --- include/linux/mm.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h

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

2023-05-01 Thread Vishal Moola (Oracle)
The page table members are now split out into their own ptdesc struct. Remove them from struct page. Signed-off-by: Vishal Moola (Oracle) --- include/linux/mm_types.h | 14 -- include/linux/pgtable.h | 3 --- 2 files changed, 17 deletions(-) diff --git a/include/linux/mm_types.h

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

2023-05-01 Thread Vishal Moola (Oracle)
page tables further. Signed-off-by: Vishal Moola (Oracle) --- arch/loongarch/include/asm/pgalloc.h | 27 +++ arch/loongarch/mm/pgtable.c | 7 --- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/arch/loongarch/include/asm/pgalloc.h b/arch

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

2023-05-01 Thread Vishal Moola (Oracle)
Part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents. Signed-off-by: Vishal Moola (Oracle) --- arch/hexagon/include/asm/pgalloc.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/hexagon/include/asm/pgalloc.h b/arch/hexagon

[PATCH v2 00/34] Split ptdesc from struct page

2023-05-01 Thread Vishal Moola (Oracle)
for PAGE_TYPE_OPS page functions Vishal Moola (Oracle) (34): mm: Add PAGE_TYPE_OP folio functions s390: Use _pt_s390_gaddr for gmap address tracking s390: Use pt_frag_refcount for pagetables pgtable: Create struct ptdesc mm: add utility functions for ptdesc mm: Convert pmd_pgtable_page

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

2023-05-01 Thread Vishal Moola (Oracle)
page tables further. Signed-off-by: Vishal Moola (Oracle) --- include/asm-generic/pgalloc.h | 62 +-- 1 file changed, 37 insertions(+), 25 deletions(-) diff --git a/include/asm-generic/pgalloc.h b/include/asm-generic/pgalloc.h index a7cf825befae..7d4a1f5d3c17 100644

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

2023-05-01 Thread Vishal Moola (Oracle)
page tables further. Signed-off-by: Vishal Moola (Oracle) --- arch/arm/include/asm/tlb.h | 12 +++- arch/arm/mm/mmu.c | 6 +++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/arch/arm/include/asm/tlb.h b/arch/arm/include/asm/tlb.h index b8cbe03ad260

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

2023-05-01 Thread Vishal Moola (Oracle)
page tables further. Signed-off-by: Vishal Moola (Oracle) --- arch/m68k/include/asm/mcf_pgalloc.h | 41 ++-- arch/m68k/include/asm/sun3_pgalloc.h | 8 +++--- arch/m68k/mm/motorola.c | 4 +-- 3 files changed, 27 insertions(+), 26 deletions(-) diff --git a/arch

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

2023-05-01 Thread Vishal Moola (Oracle)
page tables further. Signed-off-by: Vishal Moola (Oracle) --- arch/mips/include/asm/pgalloc.h | 31 +-- arch/mips/mm/pgtable.c | 7 --- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/arch/mips/include/asm/pgalloc.h b/arch/mips/include/asm

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

2023-05-01 Thread Vishal Moola (Oracle)
Part of the conversions to replace pgtable pte constructor/destructors with ptdesc equivalents. Signed-off-by: Vishal Moola (Oracle) --- arch/sparc/mm/srmmu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index

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

2023-05-01 Thread Vishal Moola (Oracle)
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) --- arch/sparc/mm/init_64.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff

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

2023-05-01 Thread Vishal Moola (Oracle)
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) --- arch/s390/mm/pgalloc.c | 38 +++--- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git

[PATCH v2 04/34] pgtable: Create struct ptdesc

2023-05-01 Thread Vishal Moola (Oracle)
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) --- include/linux/pgtable.h | 52 + 1 file changed, 52 insertions

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

2023-05-01 Thread Vishal Moola (Oracle)
In order to split struct ptdesc from struct page, convert various functions to use ptdescs. Signed-off-by: Vishal Moola (Oracle) --- arch/powerpc/mm/book3s64/mmu_context.c | 10 +++--- arch/powerpc/mm/book3s64/pgtable.c | 32 +- arch/powerpc/mm/pgtable-frag.c | 46

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

2023-05-01 Thread Vishal Moola (Oracle)
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 these to use ptdesc_alloc() and ptdesc_address() instead to help standardize page tables further. Signed-off-by: Vishal Moola (Oracle

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

2023-05-01 Thread Vishal Moola (Oracle)
Part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents. Signed-off-by: Vishal Moola (Oracle) --- arch/nios2/include/asm/pgalloc.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/nios2/include/asm/pgalloc.h b/arch/nios2/include

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

2023-05-01 Thread Vishal Moola (Oracle)
Part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents. Signed-off-by: Vishal Moola (Oracle) --- arch/openrisc/include/asm/pgalloc.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/openrisc/include/asm/pgalloc.h b/arch

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

2023-05-01 Thread Vishal Moola (Oracle)
page tables further. Signed-off-by: Vishal Moola (Oracle) --- arch/riscv/include/asm/pgalloc.h | 8 arch/riscv/mm/init.c | 16 ++-- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/arch/riscv/include/asm/pgalloc.h b/arch/riscv/include/asm/pgalloc.h

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

2023-05-01 Thread Vishal Moola (Oracle)
Part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents. Also cleans up some spacing issues. Signed-off-by: Vishal Moola (Oracle) --- arch/sh/include/asm/pgalloc.h | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/sh/include/asm

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

2023-06-12 Thread Vishal Moola (Oracle)
In order to split struct ptdesc from struct page, convert various functions to use ptdescs. Signed-off-by: Vishal Moola (Oracle) --- arch/powerpc/mm/book3s64/mmu_context.c | 10 +++--- arch/powerpc/mm/book3s64/pgtable.c | 32 +- arch/powerpc/mm/pgtable-frag.c | 46

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

2023-06-12 Thread Vishal Moola (Oracle)
Creates pagetable_pte_ctor(), pagetable_pmd_ctor(), pagetable_pte_dtor(), and pagetable_pmd_dtor() and make the original pgtable constructor/destructors wrappers. Signed-off-by: Vishal Moola (Oracle) --- include/linux/mm.h | 56 ++ 1 file changed, 42

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

2023-06-12 Thread Vishal Moola (Oracle)
Part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents. Also cleans up some spacing issues. Signed-off-by: Vishal Moola (Oracle) Reviewed-by: Geert Uytterhoeven Acked-by: John Paul Adrian Glaubitz --- arch/sh/include/asm/pgalloc.h | 9 + 1 file

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

2023-06-12 Thread Vishal Moola (Oracle)
This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Signed-off-by: Vishal Moola (Oracle) --- include/linux/mm.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h

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

2023-06-12 Thread Vishal Moola (Oracle)
This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Signed-off-by: Vishal Moola (Oracle) --- include/linux/mm.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h

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

2023-06-12 Thread Vishal Moola (Oracle)
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 these to use pagetable_alloc() and ptdesc_address() instead to help standardize page tables further. Signed-off-by: Vishal Moola

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

2023-06-12 Thread Vishal Moola (Oracle)
Part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents. Signed-off-by: Vishal Moola (Oracle) --- arch/openrisc/include/asm/pgalloc.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/openrisc/include/asm/pgalloc.h b/arch

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

2023-06-12 Thread Vishal Moola (Oracle)
ot;) which had s390 use pmd_pgtable_page() to get a gmap page table, as pmd_pgtable_page() should be used for more generic process page tables. Signed-off-by: Vishal Moola (Oracle) --- arch/s390/mm/gmap.c | 56 +++- include/linux/mm_types.h | 2 +-

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

2023-06-12 Thread Vishal Moola (Oracle)
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) --- arch/s390/mm/pgalloc.c | 38 +++--- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git

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

2023-06-12 Thread Vishal Moola (Oracle)
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 these to use pagetable_alloc() and ptdesc_address() instead to help standardize page tables further. Signed-off-by: Vishal Moola

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

2023-06-12 Thread Vishal Moola (Oracle)
Part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents. Also cleans up some spacing issues. Signed-off-by: Vishal Moola (Oracle) --- arch/um/include/asm/pgalloc.h | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/um

  1   2   3   4   >