Thread (54 messages) 54 messages, 6 authors, 2025-01-07

Re: [PATCH v4 04/15] mm: pgtable: add statistics for P4D level page table

From: Kevin Brodsky <hidden>
Date: 2025-01-03 07:46:37
Also in: linux-arch, linux-arm-kernel, linux-m68k, linux-mips, linux-mm, linux-riscv, linux-s390, linux-sh, linux-um, lkml, loongarch, sparclinux

On 03/01/2025 04:53, Qi Zheng wrote:
On 2025/1/3 00:53, Kevin Brodsky wrote:
quoted
On 30/12/2024 10:07, Qi Zheng wrote:
quoted
diff --git a/arch/riscv/include/asm/pgalloc.h
b/arch/riscv/include/asm/pgalloc.h
index 551d614d3369c..3466fbe2e508d 100644
--- a/arch/riscv/include/asm/pgalloc.h
+++ b/arch/riscv/include/asm/pgalloc.h
@@ -108,8 +108,12 @@ static inline void __pud_free_tlb(struct
mmu_gather *tlb, pud_t *pud,
  static inline void __p4d_free_tlb(struct mmu_gather *tlb, p4d_t *p4d,
                    unsigned long addr)
  {
-    if (pgtable_l5_enabled)
+    if (pgtable_l5_enabled) {
+        struct ptdesc *ptdesc = virt_to_ptdesc(p4d);
+
+        pagetable_p4d_dtor(ptdesc);
          riscv_tlb_remove_ptdesc(tlb, virt_to_ptdesc(p4d));
Nit: could use the new ptdesc variable here instead of calling
virt_to_ptdesc().
Right, but we will remove pagetable_p4d_dtor() in patch #10, so this
may not matter.
You're right, I missed that. Makes sense not to create a diff that's
reverted later then :)

- Kevin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help