From: Mike Rapoport <rppt@kernel.org>
To: "Vishal Moola (Oracle)" <vishal.moola@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Matthew Wilcox <willy@infradead.org>,
linux-mm@kvack.org, linux-arch@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org,
linux-hexagon@vger.kernel.org, loongarch@lists.linux.dev,
linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org,
linux-openrisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org,
linux-sh@vger.kernel.org, sparclinux@vger.kernel.org,
linux-um@lists.infradead.org, xen-devel@lists.xenproject.org,
kvm@vger.kernel.org, Hugh Dickins <hughd@google.com>,
David Hildenbrand <david@redhat.com>,
Claudio Imbrenda <imbrenda@linux.ibm.com>
Subject: Re: [PATCH v4 17/34] s390: Convert various pgalloc functions to use ptdescs
Date: Wed, 14 Jun 2023 17:46:43 +0300 [thread overview]
Message-ID: <20230614144643.GP52412@kernel.org> (raw)
In-Reply-To: <20230612210423.18611-18-vishal.moola@gmail.com>
On Mon, Jun 12, 2023 at 02:04:06PM -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
> these to use pagetable_alloc() and ptdesc_address() instead to help
> standardize page tables further.
>
> Signed-off-by: Vishal Moola (Oracle) <vishal.moola@gmail.com>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
> ---
> 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/asm/pgalloc.h b/arch/s390/include/asm/pgalloc.h
> index 17eb618f1348..00ad9b88fda9 100644
> --- a/arch/s390/include/asm/pgalloc.h
> +++ b/arch/s390/include/asm/pgalloc.h
> @@ -86,7 +86,7 @@ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long vmaddr)
> if (!table)
> return NULL;
> crst_table_init(table, _SEGMENT_ENTRY_EMPTY);
> - if (!pgtable_pmd_page_ctor(virt_to_page(table))) {
> + if (!pagetable_pmd_ctor(virt_to_ptdesc(table))) {
> crst_table_free(mm, table);
> return NULL;
> }
> @@ -97,7 +97,7 @@ static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
> {
> if (mm_pmd_folded(mm))
> return;
> - pgtable_pmd_page_dtor(virt_to_page(pmd));
> + pagetable_pmd_dtor(virt_to_ptdesc(pmd));
> crst_table_free(mm, (unsigned long *) pmd);
> }
>
> diff --git a/arch/s390/include/asm/tlb.h b/arch/s390/include/asm/tlb.h
> index b91f4a9b044c..383b1f91442c 100644
> --- a/arch/s390/include/asm/tlb.h
> +++ b/arch/s390/include/asm/tlb.h
> @@ -89,12 +89,12 @@ static inline void pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd,
> {
> if (mm_pmd_folded(tlb->mm))
> return;
> - pgtable_pmd_page_dtor(virt_to_page(pmd));
> + pagetable_pmd_dtor(virt_to_ptdesc(pmd));
> __tlb_adjust_range(tlb, address, PAGE_SIZE);
> tlb->mm->context.flush_mm = 1;
> tlb->freed_tables = 1;
> tlb->cleared_puds = 1;
> - tlb_remove_table(tlb, pmd);
> + tlb_remove_ptdesc(tlb, pmd);
> }
>
> /*
> diff --git a/arch/s390/mm/pgalloc.c b/arch/s390/mm/pgalloc.c
> index 6b99932abc66..eeb7c95b98cf 100644
> --- a/arch/s390/mm/pgalloc.c
> +++ b/arch/s390/mm/pgalloc.c
> @@ -43,17 +43,17 @@ __initcall(page_table_register_sysctl);
>
> unsigned long *crst_table_alloc(struct mm_struct *mm)
> {
> - struct page *page = alloc_pages(GFP_KERNEL, CRST_ALLOC_ORDER);
> + struct ptdesc *ptdesc = pagetable_alloc(GFP_KERNEL, CRST_ALLOC_ORDER);
>
> - if (!page)
> + if (!ptdesc)
> return NULL;
> - arch_set_page_dat(page, CRST_ALLOC_ORDER);
> - return (unsigned long *) page_to_virt(page);
> + arch_set_page_dat(ptdesc_page(ptdesc), CRST_ALLOC_ORDER);
> + return (unsigned long *) ptdesc_to_virt(ptdesc);
> }
>
> void crst_table_free(struct mm_struct *mm, unsigned long *table)
> {
> - free_pages((unsigned long)table, CRST_ALLOC_ORDER);
> + pagetable_free(virt_to_ptdesc(table));
> }
>
> static void __crst_table_upgrade(void *arg)
> @@ -140,21 +140,21 @@ static inline unsigned int atomic_xor_bits(atomic_t *v, unsigned int bits)
>
> struct page *page_table_alloc_pgste(struct mm_struct *mm)
> {
> - struct page *page;
> + struct ptdesc *ptdesc;
> u64 *table;
>
> - page = alloc_page(GFP_KERNEL);
> - if (page) {
> - table = (u64 *)page_to_virt(page);
> + ptdesc = pagetable_alloc(GFP_KERNEL, 0);
> + if (ptdesc) {
> + table = (u64 *)ptdesc_to_virt(ptdesc);
> memset64(table, _PAGE_INVALID, PTRS_PER_PTE);
> memset64(table + PTRS_PER_PTE, 0, PTRS_PER_PTE);
> }
> - return page;
> + return ptdesc_page(ptdesc);
> }
>
> void page_table_free_pgste(struct page *page)
> {
> - __free_page(page);
> + pagetable_free(page_ptdesc(page));
> }
>
> #endif /* CONFIG_PGSTE */
> @@ -230,7 +230,7 @@ void page_table_free_pgste(struct page *page)
> unsigned long *page_table_alloc(struct mm_struct *mm)
> {
> unsigned long *table;
> - struct page *page;
> + struct ptdesc *ptdesc;
> unsigned int mask, bit;
>
> /* Try to get a fragment of a 4K page as a 2K page table */
> @@ -238,9 +238,9 @@ unsigned long *page_table_alloc(struct mm_struct *mm)
> table = NULL;
> spin_lock_bh(&mm->context.lock);
> if (!list_empty(&mm->context.pgtable_list)) {
> - page = list_first_entry(&mm->context.pgtable_list,
> - struct page, lru);
> - mask = atomic_read(&page->pt_frag_refcount);
> + ptdesc = list_first_entry(&mm->context.pgtable_list,
> + struct ptdesc, pt_list);
> + mask = atomic_read(&ptdesc->pt_frag_refcount);
> /*
> * The pending removal bits must also be checked.
> * Failure to do so might lead to an impossible
> @@ -253,13 +253,13 @@ unsigned long *page_table_alloc(struct mm_struct *mm)
> */
> mask = (mask | (mask >> 4)) & 0x03U;
> if (mask != 0x03U) {
> - table = (unsigned long *) page_to_virt(page);
> + table = (unsigned long *) ptdesc_to_virt(ptdesc);
> bit = mask & 1; /* =1 -> second 2K */
> if (bit)
> table += PTRS_PER_PTE;
> - atomic_xor_bits(&page->pt_frag_refcount,
> + atomic_xor_bits(&ptdesc->pt_frag_refcount,
> 0x01U << bit);
> - list_del(&page->lru);
> + list_del(&ptdesc->pt_list);
> }
> }
> spin_unlock_bh(&mm->context.lock);
> @@ -267,27 +267,27 @@ unsigned long *page_table_alloc(struct mm_struct *mm)
> return table;
> }
> /* Allocate a fresh page */
> - page = alloc_page(GFP_KERNEL);
> - if (!page)
> + ptdesc = pagetable_alloc(GFP_KERNEL, 0);
> + if (!ptdesc)
> return NULL;
> - if (!pgtable_pte_page_ctor(page)) {
> - __free_page(page);
> + if (!pagetable_pte_ctor(ptdesc)) {
> + pagetable_free(ptdesc);
> return NULL;
> }
> - arch_set_page_dat(page, 0);
> + arch_set_page_dat(ptdesc_page(ptdesc), 0);
> /* Initialize page table */
> - table = (unsigned long *) page_to_virt(page);
> + table = (unsigned long *) ptdesc_to_virt(ptdesc);
> if (mm_alloc_pgste(mm)) {
> /* Return 4K page table with PGSTEs */
> - atomic_xor_bits(&page->pt_frag_refcount, 0x03U);
> + atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x03U);
> memset64((u64 *)table, _PAGE_INVALID, PTRS_PER_PTE);
> memset64((u64 *)table + PTRS_PER_PTE, 0, PTRS_PER_PTE);
> } else {
> /* Return the first 2K fragment of the page */
> - atomic_xor_bits(&page->pt_frag_refcount, 0x01U);
> + atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x01U);
> memset64((u64 *)table, _PAGE_INVALID, 2 * PTRS_PER_PTE);
> spin_lock_bh(&mm->context.lock);
> - list_add(&page->lru, &mm->context.pgtable_list);
> + list_add(&ptdesc->pt_list, &mm->context.pgtable_list);
> spin_unlock_bh(&mm->context.lock);
> }
> return table;
> @@ -309,9 +309,8 @@ static void page_table_release_check(struct page *page, void *table,
> void page_table_free(struct mm_struct *mm, unsigned long *table)
> {
> unsigned int mask, bit, half;
> - struct page *page;
> + struct ptdesc *ptdesc = virt_to_ptdesc(table);
>
> - page = virt_to_page(table);
> if (!mm_alloc_pgste(mm)) {
> /* Free 2K page table fragment of a 4K page */
> bit = ((unsigned long) table & ~PAGE_MASK)/(PTRS_PER_PTE*sizeof(pte_t));
> @@ -321,39 +320,38 @@ void page_table_free(struct mm_struct *mm, unsigned long *table)
> * will happen outside of the critical section from this
> * function or from __tlb_remove_table()
> */
> - mask = atomic_xor_bits(&page->pt_frag_refcount, 0x11U << bit);
> + mask = atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x11U << bit);
> if (mask & 0x03U)
> - list_add(&page->lru, &mm->context.pgtable_list);
> + list_add(&ptdesc->pt_list, &mm->context.pgtable_list);
> else
> - list_del(&page->lru);
> + list_del(&ptdesc->pt_list);
> spin_unlock_bh(&mm->context.lock);
> - mask = atomic_xor_bits(&page->pt_frag_refcount, 0x10U << bit);
> + mask = atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x10U << bit);
> if (mask != 0x00U)
> return;
> half = 0x01U << bit;
> } else {
> half = 0x03U;
> - mask = atomic_xor_bits(&page->pt_frag_refcount, 0x03U);
> + mask = atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x03U);
> }
>
> - page_table_release_check(page, table, half, mask);
> - pgtable_pte_page_dtor(page);
> - __free_page(page);
> + page_table_release_check(ptdesc_page(ptdesc), table, half, mask);
> + pagetable_pte_dtor(ptdesc);
> + pagetable_free(ptdesc);
> }
>
> void page_table_free_rcu(struct mmu_gather *tlb, unsigned long *table,
> unsigned long vmaddr)
> {
> struct mm_struct *mm;
> - struct page *page;
> unsigned int bit, mask;
> + struct ptdesc *ptdesc = virt_to_ptdesc(table);
>
> mm = tlb->mm;
> - page = virt_to_page(table);
> if (mm_alloc_pgste(mm)) {
> gmap_unlink(mm, table, vmaddr);
> table = (unsigned long *) ((unsigned long)table | 0x03U);
> - tlb_remove_table(tlb, table);
> + tlb_remove_ptdesc(tlb, table);
> return;
> }
> bit = ((unsigned long) table & ~PAGE_MASK) / (PTRS_PER_PTE*sizeof(pte_t));
> @@ -363,11 +361,11 @@ void page_table_free_rcu(struct mmu_gather *tlb, unsigned long *table,
> * outside of the critical section from __tlb_remove_table() or from
> * page_table_free()
> */
> - mask = atomic_xor_bits(&page->pt_frag_refcount, 0x11U << bit);
> + mask = atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x11U << bit);
> if (mask & 0x03U)
> - list_add_tail(&page->lru, &mm->context.pgtable_list);
> + list_add_tail(&ptdesc->pt_list, &mm->context.pgtable_list);
> else
> - list_del(&page->lru);
> + list_del(&ptdesc->pt_list);
> spin_unlock_bh(&mm->context.lock);
> table = (unsigned long *) ((unsigned long) table | (0x01U << bit));
> tlb_remove_table(tlb, table);
> @@ -377,7 +375,7 @@ void __tlb_remove_table(void *_table)
> {
> unsigned int mask = (unsigned long) _table & 0x03U, half = mask;
> void *table = (void *)((unsigned long) _table ^ mask);
> - struct page *page = virt_to_page(table);
> + struct ptdesc *ptdesc = virt_to_ptdesc(table);
>
> switch (half) {
> case 0x00U: /* pmd, pud, or p4d */
> @@ -385,18 +383,18 @@ void __tlb_remove_table(void *_table)
> return;
> case 0x01U: /* lower 2K of a 4K page table */
> case 0x02U: /* higher 2K of a 4K page table */
> - mask = atomic_xor_bits(&page->pt_frag_refcount, mask << 4);
> + mask = atomic_xor_bits(&ptdesc->pt_frag_refcount, mask << 4);
> if (mask != 0x00U)
> return;
> break;
> case 0x03U: /* 4K page table with pgstes */
> - mask = atomic_xor_bits(&page->pt_frag_refcount, 0x03U);
> + mask = atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x03U);
> break;
> }
>
> - page_table_release_check(page, table, half, mask);
> - pgtable_pte_page_dtor(page);
> - __free_page(page);
> + page_table_release_check(ptdesc_page(ptdesc), table, half, mask);
> + pagetable_pte_dtor(ptdesc);
> + pagetable_free(ptdesc);
> }
>
> /*
> @@ -424,16 +422,20 @@ static void base_pgt_free(unsigned long *table)
> static unsigned long *base_crst_alloc(unsigned long val)
> {
> unsigned long *table;
> + struct ptdesc *ptdesc;
>
> - table = (unsigned long *)__get_free_pages(GFP_KERNEL, CRST_ALLOC_ORDER);
> - if (table)
> - crst_table_init(table, val);
> + ptdesc = pagetable_alloc(GFP_KERNEL, CRST_ALLOC_ORDER);
> + if (!ptdesc)
> + return NULL;
> + table = ptdesc_address(ptdesc);
> +
> + crst_table_init(table, val);
> return table;
> }
>
> static void base_crst_free(unsigned long *table)
> {
> - free_pages((unsigned long)table, CRST_ALLOC_ORDER);
> + pagetable_free(virt_to_ptdesc(table));
> }
>
> #define BASE_ADDR_END_FUNC(NAME, SIZE) \
> --
> 2.40.1
>
>
--
Sincerely yours,
Mike.
WARNING: multiple messages have this Message-ID (diff)
From: Mike Rapoport <rppt@kernel.org>
To: "Vishal Moola (Oracle)" <vishal.moola@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Matthew Wilcox <willy@infradead.org>,
linux-mm@kvack.org, linux-arch@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org,
linux-hexagon@vger.kernel.org, loongarch@lists.linux.dev,
linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org,
linux-openrisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org,
linux-sh@vger.kernel.org, sparclinux@vger.kernel.org,
linux-um@lists.infradead.org, xen-devel@lists.xenproject.org,
kvm@vger.kernel.org, Hugh Dickins <hughd@google.com>,
David Hildenbrand <david@redhat.com>,
Claudio Imbrenda <imbrenda@linux.ibm.com>
Subject: Re: [PATCH v4 17/34] s390: Convert various pgalloc functions to use ptdescs
Date: Wed, 14 Jun 2023 17:46:43 +0300 [thread overview]
Message-ID: <20230614144643.GP52412@kernel.org> (raw)
In-Reply-To: <20230612210423.18611-18-vishal.moola@gmail.com>
On Mon, Jun 12, 2023 at 02:04:06PM -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
> these to use pagetable_alloc() and ptdesc_address() instead to help
> standardize page tables further.
>
> Signed-off-by: Vishal Moola (Oracle) <vishal.moola@gmail.com>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
> ---
> 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/asm/pgalloc.h b/arch/s390/include/asm/pgalloc.h
> index 17eb618f1348..00ad9b88fda9 100644
> --- a/arch/s390/include/asm/pgalloc.h
> +++ b/arch/s390/include/asm/pgalloc.h
> @@ -86,7 +86,7 @@ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long vmaddr)
> if (!table)
> return NULL;
> crst_table_init(table, _SEGMENT_ENTRY_EMPTY);
> - if (!pgtable_pmd_page_ctor(virt_to_page(table))) {
> + if (!pagetable_pmd_ctor(virt_to_ptdesc(table))) {
> crst_table_free(mm, table);
> return NULL;
> }
> @@ -97,7 +97,7 @@ static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
> {
> if (mm_pmd_folded(mm))
> return;
> - pgtable_pmd_page_dtor(virt_to_page(pmd));
> + pagetable_pmd_dtor(virt_to_ptdesc(pmd));
> crst_table_free(mm, (unsigned long *) pmd);
> }
>
> diff --git a/arch/s390/include/asm/tlb.h b/arch/s390/include/asm/tlb.h
> index b91f4a9b044c..383b1f91442c 100644
> --- a/arch/s390/include/asm/tlb.h
> +++ b/arch/s390/include/asm/tlb.h
> @@ -89,12 +89,12 @@ static inline void pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd,
> {
> if (mm_pmd_folded(tlb->mm))
> return;
> - pgtable_pmd_page_dtor(virt_to_page(pmd));
> + pagetable_pmd_dtor(virt_to_ptdesc(pmd));
> __tlb_adjust_range(tlb, address, PAGE_SIZE);
> tlb->mm->context.flush_mm = 1;
> tlb->freed_tables = 1;
> tlb->cleared_puds = 1;
> - tlb_remove_table(tlb, pmd);
> + tlb_remove_ptdesc(tlb, pmd);
> }
>
> /*
> diff --git a/arch/s390/mm/pgalloc.c b/arch/s390/mm/pgalloc.c
> index 6b99932abc66..eeb7c95b98cf 100644
> --- a/arch/s390/mm/pgalloc.c
> +++ b/arch/s390/mm/pgalloc.c
> @@ -43,17 +43,17 @@ __initcall(page_table_register_sysctl);
>
> unsigned long *crst_table_alloc(struct mm_struct *mm)
> {
> - struct page *page = alloc_pages(GFP_KERNEL, CRST_ALLOC_ORDER);
> + struct ptdesc *ptdesc = pagetable_alloc(GFP_KERNEL, CRST_ALLOC_ORDER);
>
> - if (!page)
> + if (!ptdesc)
> return NULL;
> - arch_set_page_dat(page, CRST_ALLOC_ORDER);
> - return (unsigned long *) page_to_virt(page);
> + arch_set_page_dat(ptdesc_page(ptdesc), CRST_ALLOC_ORDER);
> + return (unsigned long *) ptdesc_to_virt(ptdesc);
> }
>
> void crst_table_free(struct mm_struct *mm, unsigned long *table)
> {
> - free_pages((unsigned long)table, CRST_ALLOC_ORDER);
> + pagetable_free(virt_to_ptdesc(table));
> }
>
> static void __crst_table_upgrade(void *arg)
> @@ -140,21 +140,21 @@ static inline unsigned int atomic_xor_bits(atomic_t *v, unsigned int bits)
>
> struct page *page_table_alloc_pgste(struct mm_struct *mm)
> {
> - struct page *page;
> + struct ptdesc *ptdesc;
> u64 *table;
>
> - page = alloc_page(GFP_KERNEL);
> - if (page) {
> - table = (u64 *)page_to_virt(page);
> + ptdesc = pagetable_alloc(GFP_KERNEL, 0);
> + if (ptdesc) {
> + table = (u64 *)ptdesc_to_virt(ptdesc);
> memset64(table, _PAGE_INVALID, PTRS_PER_PTE);
> memset64(table + PTRS_PER_PTE, 0, PTRS_PER_PTE);
> }
> - return page;
> + return ptdesc_page(ptdesc);
> }
>
> void page_table_free_pgste(struct page *page)
> {
> - __free_page(page);
> + pagetable_free(page_ptdesc(page));
> }
>
> #endif /* CONFIG_PGSTE */
> @@ -230,7 +230,7 @@ void page_table_free_pgste(struct page *page)
> unsigned long *page_table_alloc(struct mm_struct *mm)
> {
> unsigned long *table;
> - struct page *page;
> + struct ptdesc *ptdesc;
> unsigned int mask, bit;
>
> /* Try to get a fragment of a 4K page as a 2K page table */
> @@ -238,9 +238,9 @@ unsigned long *page_table_alloc(struct mm_struct *mm)
> table = NULL;
> spin_lock_bh(&mm->context.lock);
> if (!list_empty(&mm->context.pgtable_list)) {
> - page = list_first_entry(&mm->context.pgtable_list,
> - struct page, lru);
> - mask = atomic_read(&page->pt_frag_refcount);
> + ptdesc = list_first_entry(&mm->context.pgtable_list,
> + struct ptdesc, pt_list);
> + mask = atomic_read(&ptdesc->pt_frag_refcount);
> /*
> * The pending removal bits must also be checked.
> * Failure to do so might lead to an impossible
> @@ -253,13 +253,13 @@ unsigned long *page_table_alloc(struct mm_struct *mm)
> */
> mask = (mask | (mask >> 4)) & 0x03U;
> if (mask != 0x03U) {
> - table = (unsigned long *) page_to_virt(page);
> + table = (unsigned long *) ptdesc_to_virt(ptdesc);
> bit = mask & 1; /* =1 -> second 2K */
> if (bit)
> table += PTRS_PER_PTE;
> - atomic_xor_bits(&page->pt_frag_refcount,
> + atomic_xor_bits(&ptdesc->pt_frag_refcount,
> 0x01U << bit);
> - list_del(&page->lru);
> + list_del(&ptdesc->pt_list);
> }
> }
> spin_unlock_bh(&mm->context.lock);
> @@ -267,27 +267,27 @@ unsigned long *page_table_alloc(struct mm_struct *mm)
> return table;
> }
> /* Allocate a fresh page */
> - page = alloc_page(GFP_KERNEL);
> - if (!page)
> + ptdesc = pagetable_alloc(GFP_KERNEL, 0);
> + if (!ptdesc)
> return NULL;
> - if (!pgtable_pte_page_ctor(page)) {
> - __free_page(page);
> + if (!pagetable_pte_ctor(ptdesc)) {
> + pagetable_free(ptdesc);
> return NULL;
> }
> - arch_set_page_dat(page, 0);
> + arch_set_page_dat(ptdesc_page(ptdesc), 0);
> /* Initialize page table */
> - table = (unsigned long *) page_to_virt(page);
> + table = (unsigned long *) ptdesc_to_virt(ptdesc);
> if (mm_alloc_pgste(mm)) {
> /* Return 4K page table with PGSTEs */
> - atomic_xor_bits(&page->pt_frag_refcount, 0x03U);
> + atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x03U);
> memset64((u64 *)table, _PAGE_INVALID, PTRS_PER_PTE);
> memset64((u64 *)table + PTRS_PER_PTE, 0, PTRS_PER_PTE);
> } else {
> /* Return the first 2K fragment of the page */
> - atomic_xor_bits(&page->pt_frag_refcount, 0x01U);
> + atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x01U);
> memset64((u64 *)table, _PAGE_INVALID, 2 * PTRS_PER_PTE);
> spin_lock_bh(&mm->context.lock);
> - list_add(&page->lru, &mm->context.pgtable_list);
> + list_add(&ptdesc->pt_list, &mm->context.pgtable_list);
> spin_unlock_bh(&mm->context.lock);
> }
> return table;
> @@ -309,9 +309,8 @@ static void page_table_release_check(struct page *page, void *table,
> void page_table_free(struct mm_struct *mm, unsigned long *table)
> {
> unsigned int mask, bit, half;
> - struct page *page;
> + struct ptdesc *ptdesc = virt_to_ptdesc(table);
>
> - page = virt_to_page(table);
> if (!mm_alloc_pgste(mm)) {
> /* Free 2K page table fragment of a 4K page */
> bit = ((unsigned long) table & ~PAGE_MASK)/(PTRS_PER_PTE*sizeof(pte_t));
> @@ -321,39 +320,38 @@ void page_table_free(struct mm_struct *mm, unsigned long *table)
> * will happen outside of the critical section from this
> * function or from __tlb_remove_table()
> */
> - mask = atomic_xor_bits(&page->pt_frag_refcount, 0x11U << bit);
> + mask = atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x11U << bit);
> if (mask & 0x03U)
> - list_add(&page->lru, &mm->context.pgtable_list);
> + list_add(&ptdesc->pt_list, &mm->context.pgtable_list);
> else
> - list_del(&page->lru);
> + list_del(&ptdesc->pt_list);
> spin_unlock_bh(&mm->context.lock);
> - mask = atomic_xor_bits(&page->pt_frag_refcount, 0x10U << bit);
> + mask = atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x10U << bit);
> if (mask != 0x00U)
> return;
> half = 0x01U << bit;
> } else {
> half = 0x03U;
> - mask = atomic_xor_bits(&page->pt_frag_refcount, 0x03U);
> + mask = atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x03U);
> }
>
> - page_table_release_check(page, table, half, mask);
> - pgtable_pte_page_dtor(page);
> - __free_page(page);
> + page_table_release_check(ptdesc_page(ptdesc), table, half, mask);
> + pagetable_pte_dtor(ptdesc);
> + pagetable_free(ptdesc);
> }
>
> void page_table_free_rcu(struct mmu_gather *tlb, unsigned long *table,
> unsigned long vmaddr)
> {
> struct mm_struct *mm;
> - struct page *page;
> unsigned int bit, mask;
> + struct ptdesc *ptdesc = virt_to_ptdesc(table);
>
> mm = tlb->mm;
> - page = virt_to_page(table);
> if (mm_alloc_pgste(mm)) {
> gmap_unlink(mm, table, vmaddr);
> table = (unsigned long *) ((unsigned long)table | 0x03U);
> - tlb_remove_table(tlb, table);
> + tlb_remove_ptdesc(tlb, table);
> return;
> }
> bit = ((unsigned long) table & ~PAGE_MASK) / (PTRS_PER_PTE*sizeof(pte_t));
> @@ -363,11 +361,11 @@ void page_table_free_rcu(struct mmu_gather *tlb, unsigned long *table,
> * outside of the critical section from __tlb_remove_table() or from
> * page_table_free()
> */
> - mask = atomic_xor_bits(&page->pt_frag_refcount, 0x11U << bit);
> + mask = atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x11U << bit);
> if (mask & 0x03U)
> - list_add_tail(&page->lru, &mm->context.pgtable_list);
> + list_add_tail(&ptdesc->pt_list, &mm->context.pgtable_list);
> else
> - list_del(&page->lru);
> + list_del(&ptdesc->pt_list);
> spin_unlock_bh(&mm->context.lock);
> table = (unsigned long *) ((unsigned long) table | (0x01U << bit));
> tlb_remove_table(tlb, table);
> @@ -377,7 +375,7 @@ void __tlb_remove_table(void *_table)
> {
> unsigned int mask = (unsigned long) _table & 0x03U, half = mask;
> void *table = (void *)((unsigned long) _table ^ mask);
> - struct page *page = virt_to_page(table);
> + struct ptdesc *ptdesc = virt_to_ptdesc(table);
>
> switch (half) {
> case 0x00U: /* pmd, pud, or p4d */
> @@ -385,18 +383,18 @@ void __tlb_remove_table(void *_table)
> return;
> case 0x01U: /* lower 2K of a 4K page table */
> case 0x02U: /* higher 2K of a 4K page table */
> - mask = atomic_xor_bits(&page->pt_frag_refcount, mask << 4);
> + mask = atomic_xor_bits(&ptdesc->pt_frag_refcount, mask << 4);
> if (mask != 0x00U)
> return;
> break;
> case 0x03U: /* 4K page table with pgstes */
> - mask = atomic_xor_bits(&page->pt_frag_refcount, 0x03U);
> + mask = atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x03U);
> break;
> }
>
> - page_table_release_check(page, table, half, mask);
> - pgtable_pte_page_dtor(page);
> - __free_page(page);
> + page_table_release_check(ptdesc_page(ptdesc), table, half, mask);
> + pagetable_pte_dtor(ptdesc);
> + pagetable_free(ptdesc);
> }
>
> /*
> @@ -424,16 +422,20 @@ static void base_pgt_free(unsigned long *table)
> static unsigned long *base_crst_alloc(unsigned long val)
> {
> unsigned long *table;
> + struct ptdesc *ptdesc;
>
> - table = (unsigned long *)__get_free_pages(GFP_KERNEL, CRST_ALLOC_ORDER);
> - if (table)
> - crst_table_init(table, val);
> + ptdesc = pagetable_alloc(GFP_KERNEL, CRST_ALLOC_ORDER);
> + if (!ptdesc)
> + return NULL;
> + table = ptdesc_address(ptdesc);
> +
> + crst_table_init(table, val);
> return table;
> }
>
> static void base_crst_free(unsigned long *table)
> {
> - free_pages((unsigned long)table, CRST_ALLOC_ORDER);
> + pagetable_free(virt_to_ptdesc(table));
> }
>
> #define BASE_ADDR_END_FUNC(NAME, SIZE) \
> --
> 2.40.1
>
>
--
Sincerely yours,
Mike.
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
WARNING: multiple messages have this Message-ID (diff)
From: Mike Rapoport <rppt@kernel.org>
To: "Vishal Moola (Oracle)" <vishal.moola@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Matthew Wilcox <willy@infradead.org>,
linux-mm@kvack.org, linux-arch@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org,
linux-hexagon@vger.kernel.org, loongarch@lists.linux.dev,
linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org,
linux-openrisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org,
linux-sh@vger.kernel.org, sparclinux@vger.kernel.org,
linux-um@lists.infradead.org, xen-devel@lists.xenproject.org,
kvm@vger.kernel.org, Hugh Dickins <hughd@google.com>,
David Hildenbrand <david@redhat.com>,
Claudio Imbrenda <imbrenda@linux.ibm.com>
Subject: Re: [PATCH v4 17/34] s390: Convert various pgalloc functions to use ptdescs
Date: Wed, 14 Jun 2023 17:46:43 +0300 [thread overview]
Message-ID: <20230614144643.GP52412@kernel.org> (raw)
In-Reply-To: <20230612210423.18611-18-vishal.moola@gmail.com>
On Mon, Jun 12, 2023 at 02:04:06PM -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
> these to use pagetable_alloc() and ptdesc_address() instead to help
> standardize page tables further.
>
> Signed-off-by: Vishal Moola (Oracle) <vishal.moola@gmail.com>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
> ---
> 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/asm/pgalloc.h b/arch/s390/include/asm/pgalloc.h
> index 17eb618f1348..00ad9b88fda9 100644
> --- a/arch/s390/include/asm/pgalloc.h
> +++ b/arch/s390/include/asm/pgalloc.h
> @@ -86,7 +86,7 @@ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long vmaddr)
> if (!table)
> return NULL;
> crst_table_init(table, _SEGMENT_ENTRY_EMPTY);
> - if (!pgtable_pmd_page_ctor(virt_to_page(table))) {
> + if (!pagetable_pmd_ctor(virt_to_ptdesc(table))) {
> crst_table_free(mm, table);
> return NULL;
> }
> @@ -97,7 +97,7 @@ static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
> {
> if (mm_pmd_folded(mm))
> return;
> - pgtable_pmd_page_dtor(virt_to_page(pmd));
> + pagetable_pmd_dtor(virt_to_ptdesc(pmd));
> crst_table_free(mm, (unsigned long *) pmd);
> }
>
> diff --git a/arch/s390/include/asm/tlb.h b/arch/s390/include/asm/tlb.h
> index b91f4a9b044c..383b1f91442c 100644
> --- a/arch/s390/include/asm/tlb.h
> +++ b/arch/s390/include/asm/tlb.h
> @@ -89,12 +89,12 @@ static inline void pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd,
> {
> if (mm_pmd_folded(tlb->mm))
> return;
> - pgtable_pmd_page_dtor(virt_to_page(pmd));
> + pagetable_pmd_dtor(virt_to_ptdesc(pmd));
> __tlb_adjust_range(tlb, address, PAGE_SIZE);
> tlb->mm->context.flush_mm = 1;
> tlb->freed_tables = 1;
> tlb->cleared_puds = 1;
> - tlb_remove_table(tlb, pmd);
> + tlb_remove_ptdesc(tlb, pmd);
> }
>
> /*
> diff --git a/arch/s390/mm/pgalloc.c b/arch/s390/mm/pgalloc.c
> index 6b99932abc66..eeb7c95b98cf 100644
> --- a/arch/s390/mm/pgalloc.c
> +++ b/arch/s390/mm/pgalloc.c
> @@ -43,17 +43,17 @@ __initcall(page_table_register_sysctl);
>
> unsigned long *crst_table_alloc(struct mm_struct *mm)
> {
> - struct page *page = alloc_pages(GFP_KERNEL, CRST_ALLOC_ORDER);
> + struct ptdesc *ptdesc = pagetable_alloc(GFP_KERNEL, CRST_ALLOC_ORDER);
>
> - if (!page)
> + if (!ptdesc)
> return NULL;
> - arch_set_page_dat(page, CRST_ALLOC_ORDER);
> - return (unsigned long *) page_to_virt(page);
> + arch_set_page_dat(ptdesc_page(ptdesc), CRST_ALLOC_ORDER);
> + return (unsigned long *) ptdesc_to_virt(ptdesc);
> }
>
> void crst_table_free(struct mm_struct *mm, unsigned long *table)
> {
> - free_pages((unsigned long)table, CRST_ALLOC_ORDER);
> + pagetable_free(virt_to_ptdesc(table));
> }
>
> static void __crst_table_upgrade(void *arg)
> @@ -140,21 +140,21 @@ static inline unsigned int atomic_xor_bits(atomic_t *v, unsigned int bits)
>
> struct page *page_table_alloc_pgste(struct mm_struct *mm)
> {
> - struct page *page;
> + struct ptdesc *ptdesc;
> u64 *table;
>
> - page = alloc_page(GFP_KERNEL);
> - if (page) {
> - table = (u64 *)page_to_virt(page);
> + ptdesc = pagetable_alloc(GFP_KERNEL, 0);
> + if (ptdesc) {
> + table = (u64 *)ptdesc_to_virt(ptdesc);
> memset64(table, _PAGE_INVALID, PTRS_PER_PTE);
> memset64(table + PTRS_PER_PTE, 0, PTRS_PER_PTE);
> }
> - return page;
> + return ptdesc_page(ptdesc);
> }
>
> void page_table_free_pgste(struct page *page)
> {
> - __free_page(page);
> + pagetable_free(page_ptdesc(page));
> }
>
> #endif /* CONFIG_PGSTE */
> @@ -230,7 +230,7 @@ void page_table_free_pgste(struct page *page)
> unsigned long *page_table_alloc(struct mm_struct *mm)
> {
> unsigned long *table;
> - struct page *page;
> + struct ptdesc *ptdesc;
> unsigned int mask, bit;
>
> /* Try to get a fragment of a 4K page as a 2K page table */
> @@ -238,9 +238,9 @@ unsigned long *page_table_alloc(struct mm_struct *mm)
> table = NULL;
> spin_lock_bh(&mm->context.lock);
> if (!list_empty(&mm->context.pgtable_list)) {
> - page = list_first_entry(&mm->context.pgtable_list,
> - struct page, lru);
> - mask = atomic_read(&page->pt_frag_refcount);
> + ptdesc = list_first_entry(&mm->context.pgtable_list,
> + struct ptdesc, pt_list);
> + mask = atomic_read(&ptdesc->pt_frag_refcount);
> /*
> * The pending removal bits must also be checked.
> * Failure to do so might lead to an impossible
> @@ -253,13 +253,13 @@ unsigned long *page_table_alloc(struct mm_struct *mm)
> */
> mask = (mask | (mask >> 4)) & 0x03U;
> if (mask != 0x03U) {
> - table = (unsigned long *) page_to_virt(page);
> + table = (unsigned long *) ptdesc_to_virt(ptdesc);
> bit = mask & 1; /* =1 -> second 2K */
> if (bit)
> table += PTRS_PER_PTE;
> - atomic_xor_bits(&page->pt_frag_refcount,
> + atomic_xor_bits(&ptdesc->pt_frag_refcount,
> 0x01U << bit);
> - list_del(&page->lru);
> + list_del(&ptdesc->pt_list);
> }
> }
> spin_unlock_bh(&mm->context.lock);
> @@ -267,27 +267,27 @@ unsigned long *page_table_alloc(struct mm_struct *mm)
> return table;
> }
> /* Allocate a fresh page */
> - page = alloc_page(GFP_KERNEL);
> - if (!page)
> + ptdesc = pagetable_alloc(GFP_KERNEL, 0);
> + if (!ptdesc)
> return NULL;
> - if (!pgtable_pte_page_ctor(page)) {
> - __free_page(page);
> + if (!pagetable_pte_ctor(ptdesc)) {
> + pagetable_free(ptdesc);
> return NULL;
> }
> - arch_set_page_dat(page, 0);
> + arch_set_page_dat(ptdesc_page(ptdesc), 0);
> /* Initialize page table */
> - table = (unsigned long *) page_to_virt(page);
> + table = (unsigned long *) ptdesc_to_virt(ptdesc);
> if (mm_alloc_pgste(mm)) {
> /* Return 4K page table with PGSTEs */
> - atomic_xor_bits(&page->pt_frag_refcount, 0x03U);
> + atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x03U);
> memset64((u64 *)table, _PAGE_INVALID, PTRS_PER_PTE);
> memset64((u64 *)table + PTRS_PER_PTE, 0, PTRS_PER_PTE);
> } else {
> /* Return the first 2K fragment of the page */
> - atomic_xor_bits(&page->pt_frag_refcount, 0x01U);
> + atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x01U);
> memset64((u64 *)table, _PAGE_INVALID, 2 * PTRS_PER_PTE);
> spin_lock_bh(&mm->context.lock);
> - list_add(&page->lru, &mm->context.pgtable_list);
> + list_add(&ptdesc->pt_list, &mm->context.pgtable_list);
> spin_unlock_bh(&mm->context.lock);
> }
> return table;
> @@ -309,9 +309,8 @@ static void page_table_release_check(struct page *page, void *table,
> void page_table_free(struct mm_struct *mm, unsigned long *table)
> {
> unsigned int mask, bit, half;
> - struct page *page;
> + struct ptdesc *ptdesc = virt_to_ptdesc(table);
>
> - page = virt_to_page(table);
> if (!mm_alloc_pgste(mm)) {
> /* Free 2K page table fragment of a 4K page */
> bit = ((unsigned long) table & ~PAGE_MASK)/(PTRS_PER_PTE*sizeof(pte_t));
> @@ -321,39 +320,38 @@ void page_table_free(struct mm_struct *mm, unsigned long *table)
> * will happen outside of the critical section from this
> * function or from __tlb_remove_table()
> */
> - mask = atomic_xor_bits(&page->pt_frag_refcount, 0x11U << bit);
> + mask = atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x11U << bit);
> if (mask & 0x03U)
> - list_add(&page->lru, &mm->context.pgtable_list);
> + list_add(&ptdesc->pt_list, &mm->context.pgtable_list);
> else
> - list_del(&page->lru);
> + list_del(&ptdesc->pt_list);
> spin_unlock_bh(&mm->context.lock);
> - mask = atomic_xor_bits(&page->pt_frag_refcount, 0x10U << bit);
> + mask = atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x10U << bit);
> if (mask != 0x00U)
> return;
> half = 0x01U << bit;
> } else {
> half = 0x03U;
> - mask = atomic_xor_bits(&page->pt_frag_refcount, 0x03U);
> + mask = atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x03U);
> }
>
> - page_table_release_check(page, table, half, mask);
> - pgtable_pte_page_dtor(page);
> - __free_page(page);
> + page_table_release_check(ptdesc_page(ptdesc), table, half, mask);
> + pagetable_pte_dtor(ptdesc);
> + pagetable_free(ptdesc);
> }
>
> void page_table_free_rcu(struct mmu_gather *tlb, unsigned long *table,
> unsigned long vmaddr)
> {
> struct mm_struct *mm;
> - struct page *page;
> unsigned int bit, mask;
> + struct ptdesc *ptdesc = virt_to_ptdesc(table);
>
> mm = tlb->mm;
> - page = virt_to_page(table);
> if (mm_alloc_pgste(mm)) {
> gmap_unlink(mm, table, vmaddr);
> table = (unsigned long *) ((unsigned long)table | 0x03U);
> - tlb_remove_table(tlb, table);
> + tlb_remove_ptdesc(tlb, table);
> return;
> }
> bit = ((unsigned long) table & ~PAGE_MASK) / (PTRS_PER_PTE*sizeof(pte_t));
> @@ -363,11 +361,11 @@ void page_table_free_rcu(struct mmu_gather *tlb, unsigned long *table,
> * outside of the critical section from __tlb_remove_table() or from
> * page_table_free()
> */
> - mask = atomic_xor_bits(&page->pt_frag_refcount, 0x11U << bit);
> + mask = atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x11U << bit);
> if (mask & 0x03U)
> - list_add_tail(&page->lru, &mm->context.pgtable_list);
> + list_add_tail(&ptdesc->pt_list, &mm->context.pgtable_list);
> else
> - list_del(&page->lru);
> + list_del(&ptdesc->pt_list);
> spin_unlock_bh(&mm->context.lock);
> table = (unsigned long *) ((unsigned long) table | (0x01U << bit));
> tlb_remove_table(tlb, table);
> @@ -377,7 +375,7 @@ void __tlb_remove_table(void *_table)
> {
> unsigned int mask = (unsigned long) _table & 0x03U, half = mask;
> void *table = (void *)((unsigned long) _table ^ mask);
> - struct page *page = virt_to_page(table);
> + struct ptdesc *ptdesc = virt_to_ptdesc(table);
>
> switch (half) {
> case 0x00U: /* pmd, pud, or p4d */
> @@ -385,18 +383,18 @@ void __tlb_remove_table(void *_table)
> return;
> case 0x01U: /* lower 2K of a 4K page table */
> case 0x02U: /* higher 2K of a 4K page table */
> - mask = atomic_xor_bits(&page->pt_frag_refcount, mask << 4);
> + mask = atomic_xor_bits(&ptdesc->pt_frag_refcount, mask << 4);
> if (mask != 0x00U)
> return;
> break;
> case 0x03U: /* 4K page table with pgstes */
> - mask = atomic_xor_bits(&page->pt_frag_refcount, 0x03U);
> + mask = atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x03U);
> break;
> }
>
> - page_table_release_check(page, table, half, mask);
> - pgtable_pte_page_dtor(page);
> - __free_page(page);
> + page_table_release_check(ptdesc_page(ptdesc), table, half, mask);
> + pagetable_pte_dtor(ptdesc);
> + pagetable_free(ptdesc);
> }
>
> /*
> @@ -424,16 +422,20 @@ static void base_pgt_free(unsigned long *table)
> static unsigned long *base_crst_alloc(unsigned long val)
> {
> unsigned long *table;
> + struct ptdesc *ptdesc;
>
> - table = (unsigned long *)__get_free_pages(GFP_KERNEL, CRST_ALLOC_ORDER);
> - if (table)
> - crst_table_init(table, val);
> + ptdesc = pagetable_alloc(GFP_KERNEL, CRST_ALLOC_ORDER);
> + if (!ptdesc)
> + return NULL;
> + table = ptdesc_address(ptdesc);
> +
> + crst_table_init(table, val);
> return table;
> }
>
> static void base_crst_free(unsigned long *table)
> {
> - free_pages((unsigned long)table, CRST_ALLOC_ORDER);
> + pagetable_free(virt_to_ptdesc(table));
> }
>
> #define BASE_ADDR_END_FUNC(NAME, SIZE) \
> --
> 2.40.1
>
>
--
Sincerely yours,
Mike.
_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um
WARNING: multiple messages have this Message-ID (diff)
From: Mike Rapoport <rppt@kernel.org>
To: "Vishal Moola (Oracle)" <vishal.moola@gmail.com>
Cc: kvm@vger.kernel.org, linux-sh@vger.kernel.org,
linux-openrisc@vger.kernel.org,
Matthew Wilcox <willy@infradead.org>,
sparclinux@vger.kernel.org, linux-riscv@lists.infradead.org,
Claudio Imbrenda <imbrenda@linux.ibm.com>,
linux-arch@vger.kernel.org, linux-s390@vger.kernel.org,
linux-hexagon@vger.kernel.org,
David Hildenbrand <david@redhat.com>,
Hugh Dickins <hughd@google.com>,
linux-csky@vger.kernel.org, xen-devel@lists.xenproject.org,
linux-um@lists.infradead.org, linux-m68k@lists.linux-m68k.org,
loongarch@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-mm@kvack.org, linux-mips@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v4 17/34] s390: Convert various pgalloc functions to use ptdescs
Date: Wed, 14 Jun 2023 17:46:43 +0300 [thread overview]
Message-ID: <20230614144643.GP52412@kernel.org> (raw)
In-Reply-To: <20230612210423.18611-18-vishal.moola@gmail.com>
On Mon, Jun 12, 2023 at 02:04:06PM -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
> these to use pagetable_alloc() and ptdesc_address() instead to help
> standardize page tables further.
>
> Signed-off-by: Vishal Moola (Oracle) <vishal.moola@gmail.com>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
> ---
> 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/asm/pgalloc.h b/arch/s390/include/asm/pgalloc.h
> index 17eb618f1348..00ad9b88fda9 100644
> --- a/arch/s390/include/asm/pgalloc.h
> +++ b/arch/s390/include/asm/pgalloc.h
> @@ -86,7 +86,7 @@ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long vmaddr)
> if (!table)
> return NULL;
> crst_table_init(table, _SEGMENT_ENTRY_EMPTY);
> - if (!pgtable_pmd_page_ctor(virt_to_page(table))) {
> + if (!pagetable_pmd_ctor(virt_to_ptdesc(table))) {
> crst_table_free(mm, table);
> return NULL;
> }
> @@ -97,7 +97,7 @@ static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
> {
> if (mm_pmd_folded(mm))
> return;
> - pgtable_pmd_page_dtor(virt_to_page(pmd));
> + pagetable_pmd_dtor(virt_to_ptdesc(pmd));
> crst_table_free(mm, (unsigned long *) pmd);
> }
>
> diff --git a/arch/s390/include/asm/tlb.h b/arch/s390/include/asm/tlb.h
> index b91f4a9b044c..383b1f91442c 100644
> --- a/arch/s390/include/asm/tlb.h
> +++ b/arch/s390/include/asm/tlb.h
> @@ -89,12 +89,12 @@ static inline void pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd,
> {
> if (mm_pmd_folded(tlb->mm))
> return;
> - pgtable_pmd_page_dtor(virt_to_page(pmd));
> + pagetable_pmd_dtor(virt_to_ptdesc(pmd));
> __tlb_adjust_range(tlb, address, PAGE_SIZE);
> tlb->mm->context.flush_mm = 1;
> tlb->freed_tables = 1;
> tlb->cleared_puds = 1;
> - tlb_remove_table(tlb, pmd);
> + tlb_remove_ptdesc(tlb, pmd);
> }
>
> /*
> diff --git a/arch/s390/mm/pgalloc.c b/arch/s390/mm/pgalloc.c
> index 6b99932abc66..eeb7c95b98cf 100644
> --- a/arch/s390/mm/pgalloc.c
> +++ b/arch/s390/mm/pgalloc.c
> @@ -43,17 +43,17 @@ __initcall(page_table_register_sysctl);
>
> unsigned long *crst_table_alloc(struct mm_struct *mm)
> {
> - struct page *page = alloc_pages(GFP_KERNEL, CRST_ALLOC_ORDER);
> + struct ptdesc *ptdesc = pagetable_alloc(GFP_KERNEL, CRST_ALLOC_ORDER);
>
> - if (!page)
> + if (!ptdesc)
> return NULL;
> - arch_set_page_dat(page, CRST_ALLOC_ORDER);
> - return (unsigned long *) page_to_virt(page);
> + arch_set_page_dat(ptdesc_page(ptdesc), CRST_ALLOC_ORDER);
> + return (unsigned long *) ptdesc_to_virt(ptdesc);
> }
>
> void crst_table_free(struct mm_struct *mm, unsigned long *table)
> {
> - free_pages((unsigned long)table, CRST_ALLOC_ORDER);
> + pagetable_free(virt_to_ptdesc(table));
> }
>
> static void __crst_table_upgrade(void *arg)
> @@ -140,21 +140,21 @@ static inline unsigned int atomic_xor_bits(atomic_t *v, unsigned int bits)
>
> struct page *page_table_alloc_pgste(struct mm_struct *mm)
> {
> - struct page *page;
> + struct ptdesc *ptdesc;
> u64 *table;
>
> - page = alloc_page(GFP_KERNEL);
> - if (page) {
> - table = (u64 *)page_to_virt(page);
> + ptdesc = pagetable_alloc(GFP_KERNEL, 0);
> + if (ptdesc) {
> + table = (u64 *)ptdesc_to_virt(ptdesc);
> memset64(table, _PAGE_INVALID, PTRS_PER_PTE);
> memset64(table + PTRS_PER_PTE, 0, PTRS_PER_PTE);
> }
> - return page;
> + return ptdesc_page(ptdesc);
> }
>
> void page_table_free_pgste(struct page *page)
> {
> - __free_page(page);
> + pagetable_free(page_ptdesc(page));
> }
>
> #endif /* CONFIG_PGSTE */
> @@ -230,7 +230,7 @@ void page_table_free_pgste(struct page *page)
> unsigned long *page_table_alloc(struct mm_struct *mm)
> {
> unsigned long *table;
> - struct page *page;
> + struct ptdesc *ptdesc;
> unsigned int mask, bit;
>
> /* Try to get a fragment of a 4K page as a 2K page table */
> @@ -238,9 +238,9 @@ unsigned long *page_table_alloc(struct mm_struct *mm)
> table = NULL;
> spin_lock_bh(&mm->context.lock);
> if (!list_empty(&mm->context.pgtable_list)) {
> - page = list_first_entry(&mm->context.pgtable_list,
> - struct page, lru);
> - mask = atomic_read(&page->pt_frag_refcount);
> + ptdesc = list_first_entry(&mm->context.pgtable_list,
> + struct ptdesc, pt_list);
> + mask = atomic_read(&ptdesc->pt_frag_refcount);
> /*
> * The pending removal bits must also be checked.
> * Failure to do so might lead to an impossible
> @@ -253,13 +253,13 @@ unsigned long *page_table_alloc(struct mm_struct *mm)
> */
> mask = (mask | (mask >> 4)) & 0x03U;
> if (mask != 0x03U) {
> - table = (unsigned long *) page_to_virt(page);
> + table = (unsigned long *) ptdesc_to_virt(ptdesc);
> bit = mask & 1; /* =1 -> second 2K */
> if (bit)
> table += PTRS_PER_PTE;
> - atomic_xor_bits(&page->pt_frag_refcount,
> + atomic_xor_bits(&ptdesc->pt_frag_refcount,
> 0x01U << bit);
> - list_del(&page->lru);
> + list_del(&ptdesc->pt_list);
> }
> }
> spin_unlock_bh(&mm->context.lock);
> @@ -267,27 +267,27 @@ unsigned long *page_table_alloc(struct mm_struct *mm)
> return table;
> }
> /* Allocate a fresh page */
> - page = alloc_page(GFP_KERNEL);
> - if (!page)
> + ptdesc = pagetable_alloc(GFP_KERNEL, 0);
> + if (!ptdesc)
> return NULL;
> - if (!pgtable_pte_page_ctor(page)) {
> - __free_page(page);
> + if (!pagetable_pte_ctor(ptdesc)) {
> + pagetable_free(ptdesc);
> return NULL;
> }
> - arch_set_page_dat(page, 0);
> + arch_set_page_dat(ptdesc_page(ptdesc), 0);
> /* Initialize page table */
> - table = (unsigned long *) page_to_virt(page);
> + table = (unsigned long *) ptdesc_to_virt(ptdesc);
> if (mm_alloc_pgste(mm)) {
> /* Return 4K page table with PGSTEs */
> - atomic_xor_bits(&page->pt_frag_refcount, 0x03U);
> + atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x03U);
> memset64((u64 *)table, _PAGE_INVALID, PTRS_PER_PTE);
> memset64((u64 *)table + PTRS_PER_PTE, 0, PTRS_PER_PTE);
> } else {
> /* Return the first 2K fragment of the page */
> - atomic_xor_bits(&page->pt_frag_refcount, 0x01U);
> + atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x01U);
> memset64((u64 *)table, _PAGE_INVALID, 2 * PTRS_PER_PTE);
> spin_lock_bh(&mm->context.lock);
> - list_add(&page->lru, &mm->context.pgtable_list);
> + list_add(&ptdesc->pt_list, &mm->context.pgtable_list);
> spin_unlock_bh(&mm->context.lock);
> }
> return table;
> @@ -309,9 +309,8 @@ static void page_table_release_check(struct page *page, void *table,
> void page_table_free(struct mm_struct *mm, unsigned long *table)
> {
> unsigned int mask, bit, half;
> - struct page *page;
> + struct ptdesc *ptdesc = virt_to_ptdesc(table);
>
> - page = virt_to_page(table);
> if (!mm_alloc_pgste(mm)) {
> /* Free 2K page table fragment of a 4K page */
> bit = ((unsigned long) table & ~PAGE_MASK)/(PTRS_PER_PTE*sizeof(pte_t));
> @@ -321,39 +320,38 @@ void page_table_free(struct mm_struct *mm, unsigned long *table)
> * will happen outside of the critical section from this
> * function or from __tlb_remove_table()
> */
> - mask = atomic_xor_bits(&page->pt_frag_refcount, 0x11U << bit);
> + mask = atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x11U << bit);
> if (mask & 0x03U)
> - list_add(&page->lru, &mm->context.pgtable_list);
> + list_add(&ptdesc->pt_list, &mm->context.pgtable_list);
> else
> - list_del(&page->lru);
> + list_del(&ptdesc->pt_list);
> spin_unlock_bh(&mm->context.lock);
> - mask = atomic_xor_bits(&page->pt_frag_refcount, 0x10U << bit);
> + mask = atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x10U << bit);
> if (mask != 0x00U)
> return;
> half = 0x01U << bit;
> } else {
> half = 0x03U;
> - mask = atomic_xor_bits(&page->pt_frag_refcount, 0x03U);
> + mask = atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x03U);
> }
>
> - page_table_release_check(page, table, half, mask);
> - pgtable_pte_page_dtor(page);
> - __free_page(page);
> + page_table_release_check(ptdesc_page(ptdesc), table, half, mask);
> + pagetable_pte_dtor(ptdesc);
> + pagetable_free(ptdesc);
> }
>
> void page_table_free_rcu(struct mmu_gather *tlb, unsigned long *table,
> unsigned long vmaddr)
> {
> struct mm_struct *mm;
> - struct page *page;
> unsigned int bit, mask;
> + struct ptdesc *ptdesc = virt_to_ptdesc(table);
>
> mm = tlb->mm;
> - page = virt_to_page(table);
> if (mm_alloc_pgste(mm)) {
> gmap_unlink(mm, table, vmaddr);
> table = (unsigned long *) ((unsigned long)table | 0x03U);
> - tlb_remove_table(tlb, table);
> + tlb_remove_ptdesc(tlb, table);
> return;
> }
> bit = ((unsigned long) table & ~PAGE_MASK) / (PTRS_PER_PTE*sizeof(pte_t));
> @@ -363,11 +361,11 @@ void page_table_free_rcu(struct mmu_gather *tlb, unsigned long *table,
> * outside of the critical section from __tlb_remove_table() or from
> * page_table_free()
> */
> - mask = atomic_xor_bits(&page->pt_frag_refcount, 0x11U << bit);
> + mask = atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x11U << bit);
> if (mask & 0x03U)
> - list_add_tail(&page->lru, &mm->context.pgtable_list);
> + list_add_tail(&ptdesc->pt_list, &mm->context.pgtable_list);
> else
> - list_del(&page->lru);
> + list_del(&ptdesc->pt_list);
> spin_unlock_bh(&mm->context.lock);
> table = (unsigned long *) ((unsigned long) table | (0x01U << bit));
> tlb_remove_table(tlb, table);
> @@ -377,7 +375,7 @@ void __tlb_remove_table(void *_table)
> {
> unsigned int mask = (unsigned long) _table & 0x03U, half = mask;
> void *table = (void *)((unsigned long) _table ^ mask);
> - struct page *page = virt_to_page(table);
> + struct ptdesc *ptdesc = virt_to_ptdesc(table);
>
> switch (half) {
> case 0x00U: /* pmd, pud, or p4d */
> @@ -385,18 +383,18 @@ void __tlb_remove_table(void *_table)
> return;
> case 0x01U: /* lower 2K of a 4K page table */
> case 0x02U: /* higher 2K of a 4K page table */
> - mask = atomic_xor_bits(&page->pt_frag_refcount, mask << 4);
> + mask = atomic_xor_bits(&ptdesc->pt_frag_refcount, mask << 4);
> if (mask != 0x00U)
> return;
> break;
> case 0x03U: /* 4K page table with pgstes */
> - mask = atomic_xor_bits(&page->pt_frag_refcount, 0x03U);
> + mask = atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x03U);
> break;
> }
>
> - page_table_release_check(page, table, half, mask);
> - pgtable_pte_page_dtor(page);
> - __free_page(page);
> + page_table_release_check(ptdesc_page(ptdesc), table, half, mask);
> + pagetable_pte_dtor(ptdesc);
> + pagetable_free(ptdesc);
> }
>
> /*
> @@ -424,16 +422,20 @@ static void base_pgt_free(unsigned long *table)
> static unsigned long *base_crst_alloc(unsigned long val)
> {
> unsigned long *table;
> + struct ptdesc *ptdesc;
>
> - table = (unsigned long *)__get_free_pages(GFP_KERNEL, CRST_ALLOC_ORDER);
> - if (table)
> - crst_table_init(table, val);
> + ptdesc = pagetable_alloc(GFP_KERNEL, CRST_ALLOC_ORDER);
> + if (!ptdesc)
> + return NULL;
> + table = ptdesc_address(ptdesc);
> +
> + crst_table_init(table, val);
> return table;
> }
>
> static void base_crst_free(unsigned long *table)
> {
> - free_pages((unsigned long)table, CRST_ALLOC_ORDER);
> + pagetable_free(virt_to_ptdesc(table));
> }
>
> #define BASE_ADDR_END_FUNC(NAME, SIZE) \
> --
> 2.40.1
>
>
--
Sincerely yours,
Mike.
WARNING: multiple messages have this Message-ID (diff)
From: Mike Rapoport <rppt@kernel.org>
To: "Vishal Moola (Oracle)" <vishal.moola@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Matthew Wilcox <willy@infradead.org>,
linux-mm@kvack.org, linux-arch@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org,
linux-hexagon@vger.kernel.org, loongarch@lists.linux.dev,
linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org,
linux-openrisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org,
linux-sh@vger.kernel.org, sparclinux@vger.kernel.org,
linux-um@lists.infradead.org, xen-devel@lists.xenproject.org,
kvm@vger.kernel.org, Hugh Dickins <hughd@google.com>,
David Hildenbrand <david@redhat.com>,
Claudio Imbrenda <imbrenda@linux.ibm.com>
Subject: Re: [PATCH v4 17/34] s390: Convert various pgalloc functions to use ptdescs
Date: Wed, 14 Jun 2023 17:46:43 +0300 [thread overview]
Message-ID: <20230614144643.GP52412@kernel.org> (raw)
In-Reply-To: <20230612210423.18611-18-vishal.moola@gmail.com>
On Mon, Jun 12, 2023 at 02:04:06PM -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
> these to use pagetable_alloc() and ptdesc_address() instead to help
> standardize page tables further.
>
> Signed-off-by: Vishal Moola (Oracle) <vishal.moola@gmail.com>
Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>
> ---
> 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/asm/pgalloc.h b/arch/s390/include/asm/pgalloc.h
> index 17eb618f1348..00ad9b88fda9 100644
> --- a/arch/s390/include/asm/pgalloc.h
> +++ b/arch/s390/include/asm/pgalloc.h
> @@ -86,7 +86,7 @@ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long vmaddr)
> if (!table)
> return NULL;
> crst_table_init(table, _SEGMENT_ENTRY_EMPTY);
> - if (!pgtable_pmd_page_ctor(virt_to_page(table))) {
> + if (!pagetable_pmd_ctor(virt_to_ptdesc(table))) {
> crst_table_free(mm, table);
> return NULL;
> }
> @@ -97,7 +97,7 @@ static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
> {
> if (mm_pmd_folded(mm))
> return;
> - pgtable_pmd_page_dtor(virt_to_page(pmd));
> + pagetable_pmd_dtor(virt_to_ptdesc(pmd));
> crst_table_free(mm, (unsigned long *) pmd);
> }
>
> diff --git a/arch/s390/include/asm/tlb.h b/arch/s390/include/asm/tlb.h
> index b91f4a9b044c..383b1f91442c 100644
> --- a/arch/s390/include/asm/tlb.h
> +++ b/arch/s390/include/asm/tlb.h
> @@ -89,12 +89,12 @@ static inline void pmd_free_tlb(struct mmu_gather *tlb, pmd_t *pmd,
> {
> if (mm_pmd_folded(tlb->mm))
> return;
> - pgtable_pmd_page_dtor(virt_to_page(pmd));
> + pagetable_pmd_dtor(virt_to_ptdesc(pmd));
> __tlb_adjust_range(tlb, address, PAGE_SIZE);
> tlb->mm->context.flush_mm = 1;
> tlb->freed_tables = 1;
> tlb->cleared_puds = 1;
> - tlb_remove_table(tlb, pmd);
> + tlb_remove_ptdesc(tlb, pmd);
> }
>
> /*
> diff --git a/arch/s390/mm/pgalloc.c b/arch/s390/mm/pgalloc.c
> index 6b99932abc66..eeb7c95b98cf 100644
> --- a/arch/s390/mm/pgalloc.c
> +++ b/arch/s390/mm/pgalloc.c
> @@ -43,17 +43,17 @@ __initcall(page_table_register_sysctl);
>
> unsigned long *crst_table_alloc(struct mm_struct *mm)
> {
> - struct page *page = alloc_pages(GFP_KERNEL, CRST_ALLOC_ORDER);
> + struct ptdesc *ptdesc = pagetable_alloc(GFP_KERNEL, CRST_ALLOC_ORDER);
>
> - if (!page)
> + if (!ptdesc)
> return NULL;
> - arch_set_page_dat(page, CRST_ALLOC_ORDER);
> - return (unsigned long *) page_to_virt(page);
> + arch_set_page_dat(ptdesc_page(ptdesc), CRST_ALLOC_ORDER);
> + return (unsigned long *) ptdesc_to_virt(ptdesc);
> }
>
> void crst_table_free(struct mm_struct *mm, unsigned long *table)
> {
> - free_pages((unsigned long)table, CRST_ALLOC_ORDER);
> + pagetable_free(virt_to_ptdesc(table));
> }
>
> static void __crst_table_upgrade(void *arg)
> @@ -140,21 +140,21 @@ static inline unsigned int atomic_xor_bits(atomic_t *v, unsigned int bits)
>
> struct page *page_table_alloc_pgste(struct mm_struct *mm)
> {
> - struct page *page;
> + struct ptdesc *ptdesc;
> u64 *table;
>
> - page = alloc_page(GFP_KERNEL);
> - if (page) {
> - table = (u64 *)page_to_virt(page);
> + ptdesc = pagetable_alloc(GFP_KERNEL, 0);
> + if (ptdesc) {
> + table = (u64 *)ptdesc_to_virt(ptdesc);
> memset64(table, _PAGE_INVALID, PTRS_PER_PTE);
> memset64(table + PTRS_PER_PTE, 0, PTRS_PER_PTE);
> }
> - return page;
> + return ptdesc_page(ptdesc);
> }
>
> void page_table_free_pgste(struct page *page)
> {
> - __free_page(page);
> + pagetable_free(page_ptdesc(page));
> }
>
> #endif /* CONFIG_PGSTE */
> @@ -230,7 +230,7 @@ void page_table_free_pgste(struct page *page)
> unsigned long *page_table_alloc(struct mm_struct *mm)
> {
> unsigned long *table;
> - struct page *page;
> + struct ptdesc *ptdesc;
> unsigned int mask, bit;
>
> /* Try to get a fragment of a 4K page as a 2K page table */
> @@ -238,9 +238,9 @@ unsigned long *page_table_alloc(struct mm_struct *mm)
> table = NULL;
> spin_lock_bh(&mm->context.lock);
> if (!list_empty(&mm->context.pgtable_list)) {
> - page = list_first_entry(&mm->context.pgtable_list,
> - struct page, lru);
> - mask = atomic_read(&page->pt_frag_refcount);
> + ptdesc = list_first_entry(&mm->context.pgtable_list,
> + struct ptdesc, pt_list);
> + mask = atomic_read(&ptdesc->pt_frag_refcount);
> /*
> * The pending removal bits must also be checked.
> * Failure to do so might lead to an impossible
> @@ -253,13 +253,13 @@ unsigned long *page_table_alloc(struct mm_struct *mm)
> */
> mask = (mask | (mask >> 4)) & 0x03U;
> if (mask != 0x03U) {
> - table = (unsigned long *) page_to_virt(page);
> + table = (unsigned long *) ptdesc_to_virt(ptdesc);
> bit = mask & 1; /* =1 -> second 2K */
> if (bit)
> table += PTRS_PER_PTE;
> - atomic_xor_bits(&page->pt_frag_refcount,
> + atomic_xor_bits(&ptdesc->pt_frag_refcount,
> 0x01U << bit);
> - list_del(&page->lru);
> + list_del(&ptdesc->pt_list);
> }
> }
> spin_unlock_bh(&mm->context.lock);
> @@ -267,27 +267,27 @@ unsigned long *page_table_alloc(struct mm_struct *mm)
> return table;
> }
> /* Allocate a fresh page */
> - page = alloc_page(GFP_KERNEL);
> - if (!page)
> + ptdesc = pagetable_alloc(GFP_KERNEL, 0);
> + if (!ptdesc)
> return NULL;
> - if (!pgtable_pte_page_ctor(page)) {
> - __free_page(page);
> + if (!pagetable_pte_ctor(ptdesc)) {
> + pagetable_free(ptdesc);
> return NULL;
> }
> - arch_set_page_dat(page, 0);
> + arch_set_page_dat(ptdesc_page(ptdesc), 0);
> /* Initialize page table */
> - table = (unsigned long *) page_to_virt(page);
> + table = (unsigned long *) ptdesc_to_virt(ptdesc);
> if (mm_alloc_pgste(mm)) {
> /* Return 4K page table with PGSTEs */
> - atomic_xor_bits(&page->pt_frag_refcount, 0x03U);
> + atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x03U);
> memset64((u64 *)table, _PAGE_INVALID, PTRS_PER_PTE);
> memset64((u64 *)table + PTRS_PER_PTE, 0, PTRS_PER_PTE);
> } else {
> /* Return the first 2K fragment of the page */
> - atomic_xor_bits(&page->pt_frag_refcount, 0x01U);
> + atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x01U);
> memset64((u64 *)table, _PAGE_INVALID, 2 * PTRS_PER_PTE);
> spin_lock_bh(&mm->context.lock);
> - list_add(&page->lru, &mm->context.pgtable_list);
> + list_add(&ptdesc->pt_list, &mm->context.pgtable_list);
> spin_unlock_bh(&mm->context.lock);
> }
> return table;
> @@ -309,9 +309,8 @@ static void page_table_release_check(struct page *page, void *table,
> void page_table_free(struct mm_struct *mm, unsigned long *table)
> {
> unsigned int mask, bit, half;
> - struct page *page;
> + struct ptdesc *ptdesc = virt_to_ptdesc(table);
>
> - page = virt_to_page(table);
> if (!mm_alloc_pgste(mm)) {
> /* Free 2K page table fragment of a 4K page */
> bit = ((unsigned long) table & ~PAGE_MASK)/(PTRS_PER_PTE*sizeof(pte_t));
> @@ -321,39 +320,38 @@ void page_table_free(struct mm_struct *mm, unsigned long *table)
> * will happen outside of the critical section from this
> * function or from __tlb_remove_table()
> */
> - mask = atomic_xor_bits(&page->pt_frag_refcount, 0x11U << bit);
> + mask = atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x11U << bit);
> if (mask & 0x03U)
> - list_add(&page->lru, &mm->context.pgtable_list);
> + list_add(&ptdesc->pt_list, &mm->context.pgtable_list);
> else
> - list_del(&page->lru);
> + list_del(&ptdesc->pt_list);
> spin_unlock_bh(&mm->context.lock);
> - mask = atomic_xor_bits(&page->pt_frag_refcount, 0x10U << bit);
> + mask = atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x10U << bit);
> if (mask != 0x00U)
> return;
> half = 0x01U << bit;
> } else {
> half = 0x03U;
> - mask = atomic_xor_bits(&page->pt_frag_refcount, 0x03U);
> + mask = atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x03U);
> }
>
> - page_table_release_check(page, table, half, mask);
> - pgtable_pte_page_dtor(page);
> - __free_page(page);
> + page_table_release_check(ptdesc_page(ptdesc), table, half, mask);
> + pagetable_pte_dtor(ptdesc);
> + pagetable_free(ptdesc);
> }
>
> void page_table_free_rcu(struct mmu_gather *tlb, unsigned long *table,
> unsigned long vmaddr)
> {
> struct mm_struct *mm;
> - struct page *page;
> unsigned int bit, mask;
> + struct ptdesc *ptdesc = virt_to_ptdesc(table);
>
> mm = tlb->mm;
> - page = virt_to_page(table);
> if (mm_alloc_pgste(mm)) {
> gmap_unlink(mm, table, vmaddr);
> table = (unsigned long *) ((unsigned long)table | 0x03U);
> - tlb_remove_table(tlb, table);
> + tlb_remove_ptdesc(tlb, table);
> return;
> }
> bit = ((unsigned long) table & ~PAGE_MASK) / (PTRS_PER_PTE*sizeof(pte_t));
> @@ -363,11 +361,11 @@ void page_table_free_rcu(struct mmu_gather *tlb, unsigned long *table,
> * outside of the critical section from __tlb_remove_table() or from
> * page_table_free()
> */
> - mask = atomic_xor_bits(&page->pt_frag_refcount, 0x11U << bit);
> + mask = atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x11U << bit);
> if (mask & 0x03U)
> - list_add_tail(&page->lru, &mm->context.pgtable_list);
> + list_add_tail(&ptdesc->pt_list, &mm->context.pgtable_list);
> else
> - list_del(&page->lru);
> + list_del(&ptdesc->pt_list);
> spin_unlock_bh(&mm->context.lock);
> table = (unsigned long *) ((unsigned long) table | (0x01U << bit));
> tlb_remove_table(tlb, table);
> @@ -377,7 +375,7 @@ void __tlb_remove_table(void *_table)
> {
> unsigned int mask = (unsigned long) _table & 0x03U, half = mask;
> void *table = (void *)((unsigned long) _table ^ mask);
> - struct page *page = virt_to_page(table);
> + struct ptdesc *ptdesc = virt_to_ptdesc(table);
>
> switch (half) {
> case 0x00U: /* pmd, pud, or p4d */
> @@ -385,18 +383,18 @@ void __tlb_remove_table(void *_table)
> return;
> case 0x01U: /* lower 2K of a 4K page table */
> case 0x02U: /* higher 2K of a 4K page table */
> - mask = atomic_xor_bits(&page->pt_frag_refcount, mask << 4);
> + mask = atomic_xor_bits(&ptdesc->pt_frag_refcount, mask << 4);
> if (mask != 0x00U)
> return;
> break;
> case 0x03U: /* 4K page table with pgstes */
> - mask = atomic_xor_bits(&page->pt_frag_refcount, 0x03U);
> + mask = atomic_xor_bits(&ptdesc->pt_frag_refcount, 0x03U);
> break;
> }
>
> - page_table_release_check(page, table, half, mask);
> - pgtable_pte_page_dtor(page);
> - __free_page(page);
> + page_table_release_check(ptdesc_page(ptdesc), table, half, mask);
> + pagetable_pte_dtor(ptdesc);
> + pagetable_free(ptdesc);
> }
>
> /*
> @@ -424,16 +422,20 @@ static void base_pgt_free(unsigned long *table)
> static unsigned long *base_crst_alloc(unsigned long val)
> {
> unsigned long *table;
> + struct ptdesc *ptdesc;
>
> - table = (unsigned long *)__get_free_pages(GFP_KERNEL, CRST_ALLOC_ORDER);
> - if (table)
> - crst_table_init(table, val);
> + ptdesc = pagetable_alloc(GFP_KERNEL, CRST_ALLOC_ORDER);
> + if (!ptdesc)
> + return NULL;
> + table = ptdesc_address(ptdesc);
> +
> + crst_table_init(table, val);
> return table;
> }
>
> static void base_crst_free(unsigned long *table)
> {
> - free_pages((unsigned long)table, CRST_ALLOC_ORDER);
> + pagetable_free(virt_to_ptdesc(table));
> }
>
> #define BASE_ADDR_END_FUNC(NAME, SIZE) \
> --
> 2.40.1
>
>
--
Sincerely yours,
Mike.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-06-14 14:47 UTC|newest]
Thread overview: 413+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-12 21:03 [PATCH v4 00/34] Split ptdesc from struct page Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` [PATCH v4 01/34] mm: Add PAGE_TYPE_OP folio functions Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-14 13:02 ` Mike Rapoport
2023-06-14 13:02 ` Mike Rapoport
2023-06-14 13:02 ` Mike Rapoport
2023-06-14 13:02 ` Mike Rapoport
2023-06-14 13:02 ` Mike Rapoport
2023-06-12 21:03 ` [PATCH v4 02/34] s390: Use _pt_s390_gaddr for gmap address tracking Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-14 13:14 ` Mike Rapoport
2023-06-14 13:14 ` Mike Rapoport
2023-06-14 13:14 ` Mike Rapoport
2023-06-14 13:14 ` Mike Rapoport
2023-06-14 13:14 ` Mike Rapoport
2023-06-12 21:03 ` [PATCH v4 03/34] s390: Use pt_frag_refcount for pagetables Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-14 13:21 ` Mike Rapoport
2023-06-14 13:21 ` Mike Rapoport
2023-06-14 13:21 ` Mike Rapoport
2023-06-14 13:21 ` Mike Rapoport
2023-06-14 13:21 ` Mike Rapoport
2023-06-12 21:03 ` [PATCH v4 04/34] pgtable: Create struct ptdesc Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-14 13:34 ` Mike Rapoport
2023-06-14 13:34 ` Mike Rapoport
2023-06-14 13:34 ` Mike Rapoport
2023-06-14 13:34 ` Mike Rapoport
2023-06-14 13:34 ` Mike Rapoport
2023-06-15 7:57 ` Hugh Dickins
2023-06-15 7:57 ` Hugh Dickins
2023-06-15 7:57 ` Hugh Dickins
2023-06-15 7:57 ` Hugh Dickins
2023-06-15 7:57 ` Hugh Dickins
2023-06-15 7:57 ` Hugh Dickins
2023-06-16 20:38 ` Matthew Wilcox
2023-06-16 20:38 ` Matthew Wilcox
2023-06-16 20:38 ` Matthew Wilcox
2023-06-16 20:38 ` Matthew Wilcox
2023-06-16 20:38 ` Matthew Wilcox
2023-06-16 21:28 ` Vishal Moola
2023-06-16 21:28 ` Vishal Moola
2023-06-16 21:28 ` Vishal Moola
2023-06-16 21:28 ` Vishal Moola
2023-06-16 21:28 ` Vishal Moola
2023-06-16 21:28 ` Vishal Moola
2023-06-16 12:38 ` Jason Gunthorpe
2023-06-16 12:38 ` Jason Gunthorpe
2023-06-16 12:38 ` Jason Gunthorpe
2023-06-16 12:38 ` Jason Gunthorpe
2023-06-16 12:38 ` Jason Gunthorpe
2023-06-20 20:01 ` Vishal Moola
2023-06-20 20:01 ` Vishal Moola
2023-06-20 20:01 ` Vishal Moola
2023-06-20 20:01 ` Vishal Moola
2023-06-20 20:01 ` Vishal Moola
2023-06-20 20:01 ` Vishal Moola
2023-06-20 23:05 ` Jason Gunthorpe
2023-06-20 23:05 ` Jason Gunthorpe
2023-06-20 23:05 ` Jason Gunthorpe
2023-06-20 23:05 ` Jason Gunthorpe
2023-06-20 23:05 ` Jason Gunthorpe
2023-06-20 23:05 ` Jason Gunthorpe
2023-06-20 23:10 ` Vishal Moola
2023-06-20 23:10 ` Vishal Moola
2023-06-20 23:10 ` Vishal Moola
2023-06-20 23:10 ` Vishal Moola
2023-06-20 23:10 ` Vishal Moola
2023-06-12 21:03 ` [PATCH v4 05/34] mm: add utility functions for ptdesc Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-14 13:48 ` Mike Rapoport
2023-06-14 13:48 ` Mike Rapoport
2023-06-14 13:48 ` Mike Rapoport
2023-06-14 13:48 ` Mike Rapoport
2023-06-14 13:48 ` Mike Rapoport
2023-06-12 21:03 ` [PATCH v4 06/34] mm: Convert pmd_pgtable_page() to pmd_ptdesc() Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-14 13:51 ` Mike Rapoport
2023-06-14 13:51 ` Mike Rapoport
2023-06-14 13:51 ` Mike Rapoport
2023-06-14 13:51 ` Mike Rapoport
2023-06-14 13:51 ` Mike Rapoport
2023-06-12 21:03 ` [PATCH v4 07/34] mm: Convert ptlock_alloc() to use ptdescs Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-14 13:51 ` Mike Rapoport
2023-06-14 13:51 ` Mike Rapoport
2023-06-14 13:51 ` Mike Rapoport
2023-06-14 13:51 ` Mike Rapoport
2023-06-14 13:51 ` Mike Rapoport
2023-06-12 21:03 ` [PATCH v4 08/34] mm: Convert ptlock_ptr() " Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-14 13:52 ` Mike Rapoport
2023-06-14 13:52 ` Mike Rapoport
2023-06-14 13:52 ` Mike Rapoport
2023-06-14 13:52 ` Mike Rapoport
2023-06-14 13:52 ` Mike Rapoport
2023-06-12 21:03 ` [PATCH v4 09/34] mm: Convert pmd_ptlock_init() " Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-14 13:52 ` Mike Rapoport
2023-06-14 13:52 ` Mike Rapoport
2023-06-14 13:52 ` Mike Rapoport
2023-06-14 13:52 ` Mike Rapoport
2023-06-14 13:52 ` Mike Rapoport
2023-06-12 21:03 ` [PATCH v4 10/34] mm: Convert ptlock_init() " Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-12 21:03 ` Vishal Moola (Oracle)
2023-06-14 13:57 ` Mike Rapoport
2023-06-14 13:57 ` Mike Rapoport
2023-06-14 13:57 ` Mike Rapoport
2023-06-14 13:57 ` Mike Rapoport
2023-06-14 13:57 ` Mike Rapoport
2023-06-12 21:04 ` [PATCH v4 11/34] mm: Convert pmd_ptlock_free() " Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-14 13:59 ` Mike Rapoport
2023-06-14 13:59 ` Mike Rapoport
2023-06-14 13:59 ` Mike Rapoport
2023-06-14 13:59 ` Mike Rapoport
2023-06-14 13:59 ` Mike Rapoport
2023-06-12 21:04 ` [PATCH v4 12/34] mm: Convert ptlock_free() " Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-14 13:59 ` Mike Rapoport
2023-06-14 13:59 ` Mike Rapoport
2023-06-14 13:59 ` Mike Rapoport
2023-06-14 13:59 ` Mike Rapoport
2023-06-14 13:59 ` Mike Rapoport
2023-06-12 21:04 ` [PATCH v4 13/34] mm: Create ptdesc equivalents for pgtable_{pte,pmd}_page_{ctor,dtor} Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-14 14:10 ` Mike Rapoport
2023-06-14 14:10 ` Mike Rapoport
2023-06-14 14:10 ` Mike Rapoport
2023-06-14 14:10 ` Mike Rapoport
2023-06-14 14:10 ` Mike Rapoport
2023-06-12 21:04 ` [PATCH v4 14/34] powerpc: Convert various functions to use ptdescs Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-14 14:19 ` Mike Rapoport
2023-06-14 14:19 ` Mike Rapoport
2023-06-14 14:19 ` Mike Rapoport
2023-06-14 14:19 ` Mike Rapoport
2023-06-14 14:19 ` Mike Rapoport
2023-06-12 21:04 ` [PATCH v4 15/34] x86: " Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-14 14:27 ` Mike Rapoport
2023-06-14 14:27 ` Mike Rapoport
2023-06-14 14:27 ` Mike Rapoport
2023-06-14 14:27 ` Mike Rapoport
2023-06-14 14:27 ` Mike Rapoport
2023-06-12 21:04 ` [PATCH v4 16/34] s390: Convert various gmap " Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-14 14:28 ` Mike Rapoport
2023-06-14 14:28 ` Mike Rapoport
2023-06-14 14:28 ` Mike Rapoport
2023-06-14 14:28 ` Mike Rapoport
2023-06-14 14:28 ` Mike Rapoport
2023-06-12 21:04 ` [PATCH v4 17/34] s390: Convert various pgalloc " Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-14 14:46 ` Mike Rapoport [this message]
2023-06-14 14:46 ` Mike Rapoport
2023-06-14 14:46 ` Mike Rapoport
2023-06-14 14:46 ` Mike Rapoport
2023-06-14 14:46 ` Mike Rapoport
2023-06-12 21:04 ` [PATCH v4 18/34] mm: Remove page table members from struct page Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-14 14:53 ` Mike Rapoport
2023-06-14 14:53 ` Mike Rapoport
2023-06-14 14:53 ` Mike Rapoport
2023-06-14 14:53 ` Mike Rapoport
2023-06-14 14:53 ` Mike Rapoport
2023-06-12 21:04 ` [PATCH v4 19/34] pgalloc: Convert various functions to use ptdescs Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-14 14:59 ` Mike Rapoport
2023-06-14 14:59 ` Mike Rapoport
2023-06-14 14:59 ` Mike Rapoport
2023-06-14 14:59 ` Mike Rapoport
2023-06-14 14:59 ` Mike Rapoport
2023-06-12 21:04 ` [PATCH v4 20/34] arm: " Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-14 15:03 ` Mike Rapoport
2023-06-14 15:03 ` Mike Rapoport
2023-06-14 15:03 ` Mike Rapoport
2023-06-14 15:03 ` Mike Rapoport
2023-06-14 15:03 ` Mike Rapoport
2023-06-12 21:04 ` [PATCH v4 21/34] arm64: " Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-14 15:05 ` Mike Rapoport
2023-06-14 15:05 ` Mike Rapoport
2023-06-14 15:05 ` Mike Rapoport
2023-06-14 15:05 ` Mike Rapoport
2023-06-14 15:05 ` Mike Rapoport
2023-06-14 16:41 ` Catalin Marinas
2023-06-14 16:41 ` Catalin Marinas
2023-06-14 16:41 ` Catalin Marinas
2023-06-14 16:41 ` Catalin Marinas
2023-06-14 16:41 ` Catalin Marinas
2023-06-12 21:04 ` [PATCH v4 22/34] csky: Convert __pte_free_tlb() " Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-14 15:07 ` Mike Rapoport
2023-06-14 15:07 ` Mike Rapoport
2023-06-14 15:07 ` Mike Rapoport
2023-06-14 15:07 ` Mike Rapoport
2023-06-14 15:07 ` Mike Rapoport
2023-06-12 21:04 ` [PATCH v4 23/34] hexagon: " Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-14 15:07 ` Mike Rapoport
2023-06-14 15:07 ` Mike Rapoport
2023-06-14 15:07 ` Mike Rapoport
2023-06-14 15:07 ` Mike Rapoport
2023-06-14 15:07 ` Mike Rapoport
2023-06-12 21:04 ` [PATCH v4 24/34] loongarch: Convert various functions " Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-14 15:09 ` Mike Rapoport
2023-06-14 15:09 ` Mike Rapoport
2023-06-14 15:09 ` Mike Rapoport
2023-06-14 15:09 ` Mike Rapoport
2023-06-14 15:09 ` Mike Rapoport
2023-06-12 21:04 ` [PATCH v4 25/34] m68k: " Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-13 7:28 ` Geert Uytterhoeven
2023-06-13 7:28 ` Geert Uytterhoeven
2023-06-13 7:28 ` Geert Uytterhoeven
2023-06-13 7:28 ` Geert Uytterhoeven
2023-06-13 7:28 ` Geert Uytterhoeven
2023-06-13 7:28 ` Geert Uytterhoeven
2023-06-14 15:12 ` Mike Rapoport
2023-06-14 15:12 ` Mike Rapoport
2023-06-14 15:12 ` Mike Rapoport
2023-06-14 15:12 ` Mike Rapoport
2023-06-14 15:12 ` Mike Rapoport
2023-06-12 21:04 ` [PATCH v4 26/34] mips: " Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-14 15:16 ` Mike Rapoport
2023-06-14 15:16 ` Mike Rapoport
2023-06-14 15:16 ` Mike Rapoport
2023-06-14 15:16 ` Mike Rapoport
2023-06-14 15:16 ` Mike Rapoport
2023-06-12 21:04 ` [PATCH v4 27/34] nios2: Convert __pte_free_tlb() " Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-13 22:16 ` Dinh Nguyen
2023-06-13 22:16 ` Dinh Nguyen
2023-06-13 22:16 ` Dinh Nguyen
2023-06-13 22:16 ` Dinh Nguyen
2023-06-13 22:16 ` Dinh Nguyen
2023-06-14 9:30 ` Geert Uytterhoeven
2023-06-14 9:30 ` Geert Uytterhoeven
2023-06-14 9:30 ` Geert Uytterhoeven
2023-06-14 9:30 ` Geert Uytterhoeven
2023-06-14 9:30 ` Geert Uytterhoeven
2023-06-14 9:30 ` Geert Uytterhoeven
2023-06-14 21:23 ` Dinh Nguyen
2023-06-14 21:23 ` Dinh Nguyen
2023-06-14 21:23 ` Dinh Nguyen
2023-06-14 21:23 ` Dinh Nguyen
2023-06-14 21:23 ` Dinh Nguyen
2023-06-14 21:23 ` Dinh Nguyen
2023-06-14 15:16 ` Mike Rapoport
2023-06-14 15:16 ` Mike Rapoport
2023-06-14 15:16 ` Mike Rapoport
2023-06-14 15:16 ` Mike Rapoport
2023-06-14 15:16 ` Mike Rapoport
2023-06-12 21:04 ` [PATCH v4 28/34] openrisc: " Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-14 15:17 ` Mike Rapoport
2023-06-14 15:17 ` Mike Rapoport
2023-06-14 15:17 ` Mike Rapoport
2023-06-14 15:17 ` Mike Rapoport
2023-06-14 15:17 ` Mike Rapoport
2023-06-12 21:04 ` [PATCH v4 29/34] riscv: Convert alloc_{pmd, pte}_late() " Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-14 15:18 ` Mike Rapoport
2023-06-14 15:18 ` Mike Rapoport
2023-06-14 15:18 ` Mike Rapoport
2023-06-14 15:18 ` Mike Rapoport
2023-06-14 15:18 ` Mike Rapoport
2023-06-12 21:04 ` [PATCH v4 30/34] sh: Convert pte_free_tlb() " Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-14 15:19 ` Mike Rapoport
2023-06-14 15:19 ` Mike Rapoport
2023-06-14 15:19 ` Mike Rapoport
2023-06-14 15:19 ` Mike Rapoport
2023-06-14 15:19 ` Mike Rapoport
2023-06-12 21:04 ` [PATCH v4 31/34] sparc64: Convert various functions " Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-14 15:20 ` Mike Rapoport
2023-06-14 15:20 ` Mike Rapoport
2023-06-14 15:20 ` Mike Rapoport
2023-06-14 15:20 ` Mike Rapoport
2023-06-14 15:20 ` Mike Rapoport
2023-06-12 21:04 ` [PATCH v4 32/34] sparc: Convert pgtable_pte_page_{ctor, dtor}() to ptdesc equivalents Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-14 15:20 ` Mike Rapoport
2023-06-14 15:20 ` Mike Rapoport
2023-06-14 15:20 ` Mike Rapoport
2023-06-14 15:20 ` Mike Rapoport
2023-06-14 15:20 ` Mike Rapoport
2023-06-12 21:04 ` [PATCH v4 33/34] um: Convert {pmd, pte}_free_tlb() to use ptdescs Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-14 15:21 ` Mike Rapoport
2023-06-14 15:21 ` Mike Rapoport
2023-06-14 15:21 ` Mike Rapoport
2023-06-14 15:21 ` Mike Rapoport
2023-06-14 15:21 ` Mike Rapoport
2023-06-12 21:04 ` [PATCH v4 34/34] mm: Remove pgtable_{pmd, pte}_page_{ctor, dtor}() wrappers Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-12 21:04 ` Vishal Moola (Oracle)
2023-06-14 15:23 ` Mike Rapoport
2023-06-14 15:23 ` Mike Rapoport
2023-06-14 15:23 ` Mike Rapoport
2023-06-14 15:23 ` Mike Rapoport
2023-06-14 15:23 ` Mike Rapoport
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230614144643.GP52412@kernel.org \
--to=rppt@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=hughd@google.com \
--cc=imbrenda@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-csky@vger.kernel.org \
--cc=linux-hexagon@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-openrisc@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=loongarch@lists.linux.dev \
--cc=sparclinux@vger.kernel.org \
--cc=vishal.moola@gmail.com \
--cc=willy@infradead.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.