[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z2RKpdv7pL34MIEt@tuxmaker.boeblingen.de.ibm.com>
Date: Thu, 19 Dec 2024 17:32:37 +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 02/15] mm: pgtable: introduce generic p4d_alloc_one()
and p4d_free()
On Wed, Dec 18, 2024 at 09:04:38PM +0800, Qi Zheng wrote:
> For these architectures, provide a generic implementation in
> asm-generic/pgalloc.h and convert them to use it. And like other levels
> of page tables, add statistics for P4D level page table.
FWIW, introducing the generic implementation and adding ctor|dtors
look as separate changes to me.
...
> static inline void p4d_free(struct mm_struct *mm, p4d_t *p4d)
> {
> - if (!pgtable_l5_enabled())
> - return;
> - BUG_ON((unsigned long)p4d & (PAGE_SIZE-1));
Or maybe?
BUG_ON(!IS_ALIGNED((unsigned long)p4d, PAGE_SIZE));
> - free_page((unsigned long)p4d);
> + if (pgtable_l5_enabled())
> + __p4d_free(mm, p4d);
> }
Powered by blists - more mailing lists