Re: [PATCH v1 0/2] Free contiguous order-0 pages efficiently

From: David Hildenbrand (Red Hat)

Date: Mon Jan 05 2026 - 11:30:46 EST


On 1/5/26 17:17, Ryan Roberts wrote:
Hi All,

Hi,


A recent change to vmalloc caused some performance benchmark regressions (see
[1]). I'm attempting to fix that (and at the same time signficantly improve
beyond the baseline) by freeing a contiguous set of order-0 pages as a batch.

I recently raised the utility of something like that in case we had to split a large folio in the page cache for guestmemfd, and then want to punch-hole the whole (original) thing while making sure that the whole thing ends up back in the buddy.

Freeing individual chunks (e.g., order-0 pages) has the problem that some pages might get reallocated before merged, consequently fragmenting the bigger chunk.

--
Cheers

David