Re: [PATCH v3 00/20] Virtual Swap Space

From: Askar Safin

Date: Tue Feb 24 2026 - 20:06:09 EST


Nhat Pham <nphamcs@xxxxxxxxx>:
> * Simplify and optimize swapoff: we only have to fault the page in and
> have the virtual swap slot points to the page instead of the on-disk
> physical swap slot. No need to perform any page table walking.

Some time ago on Linux 6.1.124 I typed "swapoff -a". OOM killer started
and killed all my apps. And "swapoff" itself eventially failed.

So, it seems swapoff is very destructive operation.

Please, make swapoff non-destructive. Or create some alternative
non-destructive swapoff. Such swapoff should try to swapoff without
killing anything. If this is not possible, it simply should return error.

I don't think optimizing current dangerous swapoff is right thing to do.

--
Askar Safin