Re: [PATCH 2/2] mm/vmalloc: Add attempt_larger_order_alloc parameter

From: Andrew Morton
Date: Tue Dec 16 2025 - 18:38:13 EST


On Tue, 16 Dec 2025 22:19:21 +0100 "Uladzislau Rezki (Sony)" <urezki@xxxxxxxxx> wrote:

> Introduce a module parameter to enable or disable the large-order
> allocation path in vmalloc. High-order allocations are disabled by
> default so far, but users may explicitly enable them at runtime if
> desired.
>
> High-order pages allocated for vmalloc are immediately split into
> order-0 pages and later freed as order-0, which means they do not
> feed the per-CPU page caches. As a result, high-order attempts tend
> to bypass the PCP fastpath and fall back to the buddy allocator that
> can affect performance.
>
> However, when the PCP caches are empty, high-order allocations may
> show better performance characteristics especially for larger
> allocation requests.
>
> Since the best strategy is workload-dependent, this patch adds a
> parameter letting users to choose whether vmalloc should try
> high-order allocations or stay strictly on the order-0 fastpath.
>
> ...
>
> +module_param(attempt_larger_order_alloc, int, 0644);

We should have user docs, please. Probably in kernel-parameters.txt.