Re: [PATCH 11/12] mm: pgtable: introduce generic __tlb_remove_table()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 16, 2024 at 08:52:06PM +0800, Qi Zheng wrote:
> 
> 
> On 2024/12/16 20:00, Peter Zijlstra wrote:
> > On Sat, Dec 14, 2024 at 05:02:57PM +0800, Qi Zheng wrote:
> 
> [...]
> 
> > > +#ifndef __HAVE_ARCH_TLB_REMOVE_TABLE
> > > +static inline void __tlb_remove_table(void *_table)
> > > +{
> > > +	struct ptdesc *ptdesc = (struct ptdesc *)_table;
> > > +
> > > +	pagetable_dtor(ptdesc);
> > > +	pagetable_free(ptdesc);
> > > +}
> > > +#endif
> > 
> > 
> > Spot the fail...
> > 
> > That said, all this ptdesc stuff is another giant trainwreck. Let me
> > clean that up for you.
> 
> It looks like you want to revert what was done in this patch series:
> 
> https://lore.kernel.org/all/20230807230513.102486-1-vishal.moola@xxxxxxxxx/
> 
> But why? It seems that splitting ptdesc from struct page is a good
> thing?

Because we're explicitly allocating pages for the page-tables, and also,
code like:

tlb_remove_page_ptdesc((tlb), (page_ptdesc(pte)));

static inline void tlb_remove_page_ptdesc(struct mmu_gather *tlb, struct ptdesc *pt)
{
	tlb_remove_page(tlb, ptdesc_page(pt));
}

Just makes me upset.

Just bloody write tlb_remove_page() and call it a day.

All that nonsense is just obfuscation at this point.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux