Re: [PATCH v2] x86: update comment about pgd_list
From: Dave Hansen
Date: Mon May 11 2026 - 16:43:35 EST
On 5/11/26 12:49, H. Peter Anvin wrote:
> The PAE code comment should still remain.
>
> I don't know if the 32-bit PAE code is still suffering from Xen-induced drain
> bramage (using a whole page to store 32 bytes),
Actually, I think I recently spread the brain damage even further. The
kmalloc()'d PGDs are completely gone now. PGDs all directly out of the
page allocator. It actually simplified the 32-bit code quite a bit.
> but it is nevertheless true in a fashion -- as there are a maximum
> of 3 kernel PDE pages, they are considered the de facto top level of
> the kernel page tables.
Here's what I ended up with:
> +/*
> + * List of all process' PGD pages (excluding init_mm and some other special
> + * system-wide PGDs). Mainly used to keep the kernel portion of the address
> + * space in sync across mms.
> + */
I think what you're saying is that those (max) 3 kernel PDE pages are
static and all PGDs always have the same value in there. So, there's no
synchronizing necessary on PAE. That was definitely true for a long time.
But we actually also moved away from that:
> https://lore.kernel.org/all/20250414173232.32444FF6@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx/
PTI forced some PMD unsharing. So I just moved 32-bit over to not share
kernel PMDs at all. It made the 32-bit code quite a bit simpler,
although it wastes memory when PTI is disabled.