Re: [PATCH v2] mm: Enable suspend-only swap spaces

From: Michal Hocko
Date: Wed Jul 14 2021 - 04:00:23 EST


On Wed 14-07-21 09:51:13, David Hildenbrand wrote:
[...]
> Anyhow, the proposal here does not sound completely crazy to me, although
> it's unfortunate how we decided to mangle hibernation and swapping into the
> same mechanism originally; a different interface to active "hibernation only
> backends" would be cleaner than doing a "swapon ..." without swapping.

Completely agreed! And I suspect that a special swap flag just digs that
hole even deeper. While the flag might look simple enough now I am a bit
worried this will open traps in the future.

I am not saying the idea is crazy either, it is just a hack on top of
the existing hack and as such it requires a very good reasoning. So far
I have heard rather vague justification and I am especially curious
about the "no mixing with the regular swapout" concern. It might be very
well the case that there are more usecases which would benefit from it.
--
Michal Hocko
SUSE Labs