[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a84a7b0f-dad5-4100-9d0c-3b515e7fb71f@bytedance.com>
Date: Mon, 6 Jan 2025 11:53:36 +0800
From: Qi Zheng <zhengqi.arch@...edance.com>
To: Peter Zijlstra <peterz@...radead.org>, Mike Rapoport <rppt@...nel.org>
Cc: agordeev@...ux.ibm.com, kevin.brodsky@....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,
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 v3 15/17] mm: pgtable: remove tlb_remove_page_ptdesc()
On 2025/1/3 19:14, Peter Zijlstra wrote:
> On Sat, Dec 28, 2024 at 11:26:22AM +0200, Mike Rapoport wrote:
>> On Mon, Dec 23, 2024 at 05:41:01PM +0800, Qi Zheng wrote:
>>> Here we are explicitly dealing with struct page, and the following logic
>>> semms strange:
>>>
>>> tlb_remove_page_ptdesc((tlb), (page_ptdesc(pte)));
>>>
>>> tlb_remove_page_ptdesc
>>> --> tlb_remove_page(tlb, ptdesc_page(pt));
>>>
>>> So remove tlb_remove_page_ptdesc() and make callers call tlb_remove_page()
>>> directly.
>>
>> Please don't. The ptdesc wrappers are there as a part of reducing the size
>> of struct page project [1].
>>
>> For now struct ptdesc overlaps struct page, but the goal is to have them
>> separate and always operate on struct ptdesc when working with page tables.
>
> I don't see how the current idiotic code helps with that at all.
>
> Fundamentally tlb_remove_page() is about removing *pages* as from a PTE,
> there should not be a page-table anywhere near here *ever*.
>
> Yes, some architectures use tlb_remove_page() for page-tables too, but
> that is more or less an implementation detail that can be fixed.
>
> So no, please keep these patches and kill this utterly idiotic code.
>
> The only thing that should eventually care about page-tables is
> tlb_remove_table(), and that takes a 'void *' and is expected to match
> whatever __tlb_remove_table() does.
>
> Flipping those to pgdesc, once its actually a thing, should be fairly
> straight forward.
Well, since I've already sent v4, and that patch series is mainly for
bug fix, I'll send a separate patch series to do this.
Thanks!
Powered by blists - more mailing lists