[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2d16f0fe-9c7f-4229-b7b5-ffa3ab1b1143@bytedance.com>
Date: Mon, 6 Jan 2025 19:02:17 +0800
From: Qi Zheng <zhengqi.arch@...edance.com>
To: Alexander Gordeev <agordeev@...ux.ibm.com>
Cc: peterz@...radead.org, kevin.brodsky@....com, palmer@...belt.com,
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, arnd@...db.de, will@...nel.org,
aneesh.kumar@...nel.org, npiggin@...il.com, dave.hansen@...ux.intel.com,
rppt@...nel.org, ryan.roberts@....com, linux-mm@...ck.org,
linux-arm-kernel@...ts.infradead.org, linuxppc-dev@...ts.ozlabs.org,
linux-riscv@...ts.infradead.org, linux-s390@...r.kernel.org,
sparclinux@...r.kernel.org, linux-kernel@...r.kernel.org, x86@...nel.org,
linux-arch@...r.kernel.org, linux-csky@...r.kernel.org,
linux-hexagon@...r.kernel.org, loongarch@...ts.linux.dev,
linux-m68k@...ts.linux-m68k.org, linux-mips@...r.kernel.org,
linux-openrisc@...r.kernel.org, linux-sh@...r.kernel.org,
linux-um@...ts.infradead.org
Subject: Re: [PATCH v4 12/15] s390: pgtable: also move pagetable_dtor() of PxD
to __tlb_remove_table()
On 2025/1/6 18:36, Alexander Gordeev wrote:
> On Mon, Dec 30, 2024 at 05:07:47PM +0800, Qi Zheng wrote:
>> To unify the PxD and PTE TLB free path, also move the pagetable_dtor() of
>> PMD|PUD|P4D to __tlb_remove_table().
>
> The above and Subject are still incorrect: pagetable_dtor() is
> called from pagetable_dtor_free(), not from __tlb_remove_table().
Hmm, __tlb_remove_table() calls pagetable_dtor_free(), so moving to
pagetable_dtor_free() means moving to __tlb_remove_table(). Right?
And the main purpose of this patch is also to move pagetable_dtor()
to __tlb_remove_table(). So I think this description makes sense?
>
> ...
>> diff --git a/arch/s390/mm/pgalloc.c b/arch/s390/mm/pgalloc.c
>> index 569de24d33761..c73b89811a264 100644
>> --- a/arch/s390/mm/pgalloc.c
>> +++ b/arch/s390/mm/pgalloc.c
>> @@ -180,7 +180,7 @@ unsigned long *page_table_alloc(struct mm_struct *mm)
>> return table;
>> }
>>
>> -static void pagetable_pte_dtor_free(struct ptdesc *ptdesc)
>> +static void pagetable_dtor_free(struct ptdesc *ptdesc)
>> {
>> pagetable_dtor(ptdesc);
>> pagetable_free(ptdesc);
>> @@ -190,20 +190,14 @@ void page_table_free(struct mm_struct *mm, unsigned long *table)
>> {
>> struct ptdesc *ptdesc = virt_to_ptdesc(table);
>>
>> - pagetable_pte_dtor_free(ptdesc);
>> + pagetable_dtor_free(ptdesc);
>> }
>>
>> void __tlb_remove_table(void *table)
>> {
>> struct ptdesc *ptdesc = virt_to_ptdesc(table);
>> - struct page *page = ptdesc_page(ptdesc);
>>
>> - if (compound_order(page) == CRST_ALLOC_ORDER) {
>> - /* pmd, pud, or p4d */
>> - pagetable_free(ptdesc);
>> - return;
>> - }
>> - pagetable_pte_dtor_free(ptdesc);
>> + pagetable_dtor_free(ptdesc);
>> }
Powered by blists - more mailing lists