Re: [RFC PATCH v5 4/4] mm/shmem: split large folios only on -E2BIG
Barry Song <[email protected]>
| Newsgroups | org.kernel.vger.cgroups,org.kernel.vger.linux-kernel,org.kvack.linux-mm |
|---|---|
| Message-ID | <CAGsJ_4zAWOQXzGv-4SAmCsWqDtpJNuZ=SMcX2e7Xp0QEU2DFBg@mail.gmail.com> |
On Thu, Jul 30, 2026 at 8:24 PM Xueyuan Chen <[email protected]> wrote: > > shmem_writeout() currently splits a large folio on every > folio_alloc_swap() failure. With the refined return-value contract, only > -E2BIG indicates that splitting might allow smaller folios to be swapped > out. > > Enter the split fallback only for -E2BIG. For -ENOSPC and -ENOMEM, > redirty and reactivate the folio as before. > > Suggested-by: Baolin Wang <[email protected]> > Reviewed-by: Baolin Wang <[email protected]> > Signed-off-by: Xueyuan Chen <[email protected]> > --- LGTM, Reviewed-by: Barry Song <[email protected]>