On Wed, Nov 04, 2026 at 12:59:13PM +0000, Will Deacon wrote:
[...]
Sorry for the late reply, and sorry that the commit message in 18049c8cff9c ("perf/aux: Allocate non-contiguous AUX pages by default") was imprecise about "exacerbating memory fragmentation". You and Dev are right that grouping same-lifetime pages into higher-order allocations does not itself worsen fragmentation, and the TLB reduction numbers for TRBE and SPE with large vmap() mappings make total sense given TRBE's tiny TLB.
However, a straight revert will reintroduce a severe production issue we hit on Android devices, so I'd like to share what actually happened and suggest a way to get large mappings for SPE/TRBE without bringing back the regression.
[...]
Thanks, Yabin. This just hardens my stance [1] that the allocation decision should be driven by userspace and not second-guessed by the kernel. So the revert is _not_ the right approach, in my view.
If a userspace interface is needed, what remaining reclaim or allocation policy should userspace control? I am not clear how userspace control would fix the PSI reclaim stalls described in Yabin's reply.
Alternatively, we could optimize the reported reclaim cost in the kernel by clearing __GFP_RECLAIM for optional higher-order attempts, while preserving the existing policy at order 0 and for PERF_PMU_CAP_AUX_NO_SG PMUs.
If testing confirms this works, combining this mitigation with a revert of 18049c8cff9c would be a reasonable way to restore higher-order allocations for SPE/TRBE without adding a userspace interface.
Thanks, Leo