On systems with a 4k page size, when reading from a file system that has a 64k block size, every page cache folio has an order of at least 4, which is above PAGE_ALLOC_COSTLY_ORDER (== 3). As a result, any memory allocation without __GFP_RETRY_MAYFAIL or __GFP_NOFAIL can be very prone to failure, even when there is gigabytes of memory available. This is causing the xfstests test generic/251 to fail 50-60% of the time on my test appliance when running the ext4/64k configuration. It's not clear what the best solution might be. Please note that this is not ext4 specific. Any file system attempting to use a 64k block size on a system with 4k blocks could run into this issue. The simplest fix which the LLM came up with is the first attached patch; it causes mm/filemap.c to use __GFP_RETRY_MAYFAIL when needed. This is not a complete fix, however. The LLM came up with a more reliable reproducer which fails nearly 100% of the time (25/26 runs), using __GFP_RETRY_MAYFAIL beings it down to 4% of the time (1/23 runs)[1]. [1] https://github.com/tytso/ext4-artifacts/blob/main/2026-11-xfstests-test-fixes/evidence/mm251/findings.md#42-test-results Using __GFP_NOFAIL makes it completely reliable (of course), as does an additional patch which changes direct relcaim to be more aggressive if __GFP_RETRY_MAYFAIL is passed (the second attached patch, direct-reclaim.patch). I believe the first patch shouldn't be _too_ controversial; but it's not a complete solution. Is the second patch is the right way to go, or would some other approach would be better? Thanks in advance for suggestions and comments! - Ted P.S. For more details, you can read (in very exhausting detail) the report from the LLM[2]. Other xfstests failures that I'm working through can be found here[3]. [2] https://github.com/tytso/ext4-artifacts/blob/main/2026-11-xfstests-test-fixes/evidence/mm251/findings.md [3] https://github.com/tytso/ext4-artifacts/blob/main/2026-11-xfstests-test-fixes/xfstests-fixes.md