FRIDAY, APRIL 17, 2026
elf — Proposed
elf: THP-aware load segment alignment
This patch series enables THP-aware load segment alignment in glibc, reducing iTLB misses and improving performance with madvise THP.
This patch series implements THP-aware load segment alignment in glibc. Benchmarking a clang build of the Linux kernel on x86_64 with this patch in THP madvise mode shows a reduction in iTLB misses, similar to THP always mode. The latest version includes a new test case and minor formatting fixes.
Technical Tradeoffs
- Requires changes to the ELF loader.
- May increase memory usage due to alignment requirements.
- Needs careful handling of different THP modes.
- Potential compatibility issues with older kernels or systems.