Re: [RFC PATCH v2 0/4] mm/swap: reserve swap areas for deliberate offload

From
Matthias Goergens <hidden>
Date
2026-09-28 15:19:44
Also in
cgroups, dri-devel, intel-gfx, linux-arm-kernel, linux-kselftest, linux-man, linux-mm, linux-pm, lkml
Reply to
Christoph Hellwig, 2026-09-28
Hi Christoph,
Either way block devices must be safe to be called from paging paths,
not just for swap but also for file system based paging.  So this is
a bug in the implementation, and not something worked around in the
swap code.
Agreed that a backend used for paging has to make progress under
pressure, and the zvol example was a poor lead.  The series isn't
meant to excuse a backend that can deadlock; that would still be a bug
to fix in the backend.

What I'm after is different: backends that are correct but need
memory to accept a write, where the better policy is to use them for
cold-page offload when memory isn't tight and keep pressure reclaim on
areas that don't need to allocate.  Two in-tree examples: zram
allocates on writes and fails with -ENOMEM, with no fallback, while its
logical size still shows free slots; and filesystem swapfiles must
give up copy-on-write, checksums and compression today, because swap
writes bypass the filesystem.  I'll make that the case for v3 instead.

Thanks,
Matthias
Thread (14 messages) 14 messages, 6 authors, last reply 2026-10-04
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help