[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241217090222.GJ35539@noisy.programming.kicks-ass.net>
Date: Tue, 17 Dec 2024 10:02:22 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Qi Zheng <zhengqi.arch@...edance.com>
Cc: Vishal Moola <vishal.moola@...il.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, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 11/12] mm: pgtable: introduce generic __tlb_remove_table()
On Tue, Dec 17, 2024 at 11:42:02AM +0800, Qi Zheng wrote:
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index 497035a78849b..11829860ec05e 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -3064,6 +3064,14 @@ static inline void pagetable_dtor(struct ptdesc
> *ptdesc)
> lruvec_stat_sub_folio(folio, NR_PAGETABLE);
> }
>
> +static inline void pagetable_dtor_free(void *table)
> +{
> + struct ptdesc *ptdesc = page_ptdesc((struct page *)table);
> +
> + pagetable_dtor(ptdesc);
> + pagetable_dtor(ptdesc);
> +}
Right, that works, except you have whitespace issues and I think you'll
find it'll work better if you don't call _dtor twice but instead replace
that last one with _free() :-)
Powered by blists - more mailing lists