[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z2VSfMlTT54rEJy3@tuxmaker.boeblingen.de.ibm.com>
Date: Fri, 20 Dec 2024 12:18:20 +0100
From: Alexander Gordeev <agordeev@...ux.ibm.com>
To: Qi Zheng <zhengqi.arch@...edance.com>
Cc: peterz@...radead.org, tglx@...utronix.de, david@...hat.com,
jannh@...gle.com, hughd@...gle.com, yuzhao@...gle.com,
willy@...radead.org, muchun.song@...ux.dev, vbabka@...nel.org,
lorenzo.stoakes@...cle.com, akpm@...ux-foundation.org,
rientjes@...gle.com, vishal.moola@...il.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 11/15] mm: pgtable: introduce generic
__tlb_remove_table()
On Wed, Dec 18, 2024 at 09:04:47PM +0800, Qi Zheng wrote:
> Several architectures (arm, arm64, riscv, s390 and x86) define exactly the
> same __tlb_remove_table(), just introduce generic __tlb_remove_table() to
> eliminate these duplications.
s390 is nearly the same, but not exactly (see below).
> arch/s390/include/asm/tlb.h | 1 -
> arch/s390/mm/pgalloc.c | 7 -------
...
> --- a/arch/s390/mm/pgalloc.c
> +++ b/arch/s390/mm/pgalloc.c
> @@ -193,13 +193,6 @@ void page_table_free(struct mm_struct *mm, unsigned long *table)
> pagetable_dtor_free(ptdesc);
> }
>
> -void __tlb_remove_table(void *table)
> -{
> - struct ptdesc *ptdesc = virt_to_ptdesc(table);
> -
> - pagetable_dtor_free(ptdesc);
With this change you introduce these duplication in __tlb_remove_table()
and in pagetable_dtor_free():
pagetable_dtor(ptdesc);
pagetable_free(ptdesc);
But I still would prefer to avoid __HAVE_ARCH_TLB_REMOVE_TABLE.
Could it be possible to move pagetable_dtor_free() to asm-generic and
make s390 __tlb_remove_table() version generic?
> -}
> -
> #ifdef CONFIG_TRANSPARENT_HUGEPAGE
> static void pte_free_now(struct rcu_head *head)
> {
Thanks!
Powered by blists - more mailing lists