Re: [LSF/MM/BPF TOPIC] 64k (or 16k) base page size on x86

From: Kiryl Shutsemau

Date: Thu Feb 19 2026 - 17:27:05 EST


On Thu, Feb 19, 2026 at 05:47:22PM +0000, Matthew Wilcox wrote:
> On Thu, Feb 19, 2026 at 03:08:51PM +0000, Kiryl Shutsemau wrote:
> > On x86, page tables are allocated from the buddy allocator and if PG_SIZE
> > is greater than 4 KB, we need a way to pack multiple page tables into a
> > single page. We could use the slab allocator for this, but it would
> > require relocating the page-table metadata out of struct page.
>
> Have you looked at the s390/ppc implementations (yes, they're different,
> no, that sucks)?

No, will check it out tomorrow.

> slab seems like the wrong approach to me.

I was the first thing that came to mind. I have not put much time into
it

> There's a third approach that I've never looked at which is to allocate
> the larger size, then just use it for N consecutive entries.

Yeah, that's a possible way. We would need to populate 16 page table
entries of the parent page table. But you don't need to care about
fragmentation within the page.

--
Kiryl Shutsemau / Kirill A. Shutemov