Re: [PATCH v2] x86/mm: Drop the page allocation from pud_free_pmd_page()
From: Dave Hansen
Date: Wed Sep 23 2026 - 19:07:39 EST
On 9/23/26 15:31, Mikhail Gavrilov wrote:
> So clear the PUD, flush, and free the PTE tables straight from the
> detached PMD table - the same order pmd_free_pte_page() uses one level
> down. With no allocation left the cycle is gone, and so is the only way
> this function could fail.
Yeah, I basically agree with your analysis and fix.
There are a few things we need to figure out like having
pmd_free_pte_page() return 'int' when it doesn't ever fail, the
comments, and the reverse Christmas tree.
I'll dig into it a bit tomorrow and see what I come up with.