Re: [REGRESSION] kswapd0: page allocation failure (bisected to "slab: add sheaves to most caches")

From: Harry Yoo

Date: Tue Feb 24 2026 - 21:20:19 EST


On Wed, Feb 25, 2026 at 06:53:59AM +0500, Mikhail Gavrilov wrote:
> I can confirm this issue on my system:
>
> Hardware: ASUS ROG STRIX B650E-I (AMD Ryzen), 64GB RAM
> Storage: btrfs with zram swap
> Kernel: 7.0.0-rc1 (commit 6de23f81a5e0+)
>
> I was seeing the same kswapd0 page allocation failures periodically
> under memory pressure with the identical call trace through
> alloc_from_pcs -> __pcs_replace_empty_main -> refill_objects ->
> allocate_slab.
>
> Chris's btrfs __GFP_NOWARN patch suppresses the btrfs-originated
> warnings, but after ~10 hours I hit the same sheaf refill failure
> from a different caller -- amdgpu via kmalloc:
>
> chrome: page allocation failure: order:0,
> mode:0xc0cc0(GFP_KERNEL|__GFP_COMP|__GFP_NOMEMALLOC)
>
> allocate_slab
> refill_objects
> __pcs_replace_empty_main
> __kmalloc_cache_noprof
> drm_suballoc_new
> amdgpu_sa_bo_new

Hi Mikhail,

In this case __GFP_NOWARN is not specified, so indeed
we need slab side fix.

> This confirms the fix needs to be on the slab side as Harry
> suggested -- adding __GFP_NOWARN to sheaf refill when there's
> a fallback path -- rather than patching individual callers.

Thanks for testing and sharing the result!
That's very helpful.

> Happy to test any slab-side fix.

Slab fix is submitted here, please feel free to test:

https://lore.kernel.org/linux-mm/20260223133322.16705-1-harry.yoo@xxxxxxxxxx

--
Cheers,
Harry / Hyeonggon