From: Alexander Gordeev <agordeev@linux.ibm.com>
To: Qi Zheng <zhengqi.arch@bytedance.com>
Cc: peterz@infradead.org, tglx@linutronix.de, david@redhat.com,
jannh@google.com, hughd@google.com, yuzhao@google.com,
willy@infradead.org, muchun.song@linux.dev, vbabka@kernel.org,
lorenzo.stoakes@oracle.com, akpm@linux-foundation.org,
rientjes@google.com, vishal.moola@gmail.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 02/15] mm: pgtable: introduce generic p4d_alloc_one() and p4d_free()
Date: Thu, 19 Dec 2024 17:32:37 +0100 [thread overview]
Message-ID: <Z2RKpdv7pL34MIEt@tuxmaker.boeblingen.de.ibm.com> (raw)
In-Reply-To: <a1fe303307c8758d1409f96bcdec57f3f7636328.1734526570.git.zhengqi.arch@bytedance.com>
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);
> }
next prev parent reply other threads:[~2024-12-19 16:33 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-18 13:04 [PATCH v2 00/15] move pagetable_*_dtor() to __tlb_remove_table() Qi Zheng
2024-12-18 13:04 ` [PATCH v2 01/15] Revert "mm: pgtable: make ptlock be freed by RCU" Qi Zheng
2024-12-18 13:04 ` [PATCH v2 02/15] mm: pgtable: introduce generic p4d_alloc_one() and p4d_free() Qi Zheng
2024-12-18 14:53 ` [PATCH v2 02/15 fix] fix: " Qi Zheng
2024-12-19 16:32 ` Alexander Gordeev [this message]
2024-12-20 3:19 ` [PATCH v2 02/15] " Qi Zheng
2024-12-18 13:04 ` [PATCH v2 03/15] arm64: pgtable: use mmu gather to free p4d level page table Qi Zheng
2024-12-18 13:04 ` [PATCH v2 04/15] s390: pgtable: add statistics for PUD and P4D " Qi Zheng
2024-12-18 13:04 ` [PATCH v2 05/15] mm: pgtable: introduce pagetable_dtor() Qi Zheng
2024-12-18 13:04 ` [PATCH v2 06/15] arm: pgtable: move pagetable_dtor() to __tlb_remove_table() Qi Zheng
2024-12-18 13:04 ` [PATCH v2 07/15] arm64: " Qi Zheng
2024-12-18 13:04 ` [PATCH v2 08/15] riscv: " Qi Zheng
2024-12-18 13:04 ` [PATCH v2 09/15] x86: " Qi Zheng
2024-12-18 13:04 ` [PATCH v2 10/15] s390: pgtable: also move pagetable_dtor() of PxD " Qi Zheng
2024-12-20 8:42 ` Alexander Gordeev
2024-12-20 8:55 ` Qi Zheng
2024-12-18 13:04 ` [PATCH v2 11/15] mm: pgtable: introduce generic __tlb_remove_table() Qi Zheng
2024-12-18 16:39 ` Peter Zijlstra
2024-12-20 11:18 ` Alexander Gordeev
2024-12-20 11:28 ` Qi Zheng
2024-12-18 13:04 ` [PATCH v2 12/15] mm: pgtable: move __tlb_remove_table_one() in x86 to generic file Qi Zheng
2024-12-18 13:04 ` [PATCH v2 13/15] mm: pgtable: remove tlb_remove_page_ptdesc() Qi Zheng
2024-12-18 13:04 ` [PATCH v2 14/15] mm: pgtable: remove tlb_remove_ptdesc() Qi Zheng
2024-12-18 16:45 ` Peter Zijlstra
2024-12-19 2:16 ` Qi Zheng
2024-12-18 13:04 ` [PATCH v2 15/15] mm: pgtable: introduce generic pagetable_dtor_free() Qi Zheng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z2RKpdv7pL34MIEt@tuxmaker.boeblingen.de.ibm.com \
--to=agordeev@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=hughd@google.com \
--cc=jannh@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=muchun.song@linux.dev \
--cc=peterz@infradead.org \
--cc=rientjes@google.com \
--cc=tglx@linutronix.de \
--cc=vbabka@kernel.org \
--cc=vishal.moola@gmail.com \
--cc=willy@infradead.org \
--cc=yuzhao@google.com \
--cc=zhengqi.arch@bytedance.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox