Re: [PATCH] mm: shmem: fix too little space for tmpfs only fallback 4KB
From: Andrew Morton
Date: Mon Sep 08 2025 - 19:22:28 EST
On Mon, 8 Sep 2025 20:31:28 +0800 Vernon Yang <vernon2gm@xxxxxxxxx> wrote:
> From: Vernon Yang <yanglincheng@xxxxxxxxxx>
>
> When the system memory is sufficient, allocating memory is always
> successful, but when tmpfs size is low (e.g. 1MB), it falls back
> directly from 2MB to 4KB, and other small granularity (8KB ~ 1024KB)
> will not be tried.
>
> Therefore add check whether the remaining space of tmpfs is sufficient
> for allocation. If there is too little space left, try smaller large
> folio.
Thanks.
What are the effects of this change? I'm assuming it's an
*improvement*, rather than a fix for some misbehavior?