On Tue, 27 Aug 2024 at 00:10, Vlastimil Babka <vba...@suse.cz> wrote: > > Right now we give the WARN_ON_ONCE() (for !can_direct_reclaim) only when > we're about to actually return NULL, so the memory has to be depleted > already. To make it easier to find the offenders much more reliably, we > should consider doing it sooner, but also not add unnecessary overhead to > allocator fastpaths just because of the potentially buggy users.
Ack. Sounds like a sane model to me. And I agree that __alloc_pages_slowpath() is likely a reasonable middle path between "catch misuses, but don't put it in the hotpath". Linus