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

From: David Hildenbrand
Date: Mon Jul 05 2021 - 03:44:37 EST


On 30.06.21 19:07, Evan Green wrote:
Currently it's not possible to enable hibernation without also enabling
generic swap for a given swap area. These two use cases are not the
same. For example there may be users who want to enable hibernation,
but whose drives don't have the write endurance for generic swap
activities.

Add a new SWAP_FLAG_NOSWAP that adds a swap region but refuses to allow
generic swapping to it. This region can still be wired up for use in
suspend-to-disk activities, but will never have regular pages swapped to
it.

Just to confirm: things like /proc/meminfo won't show this "swap that's not actually swap" as free/total swap, correct? Maybe it's worth spelling the expected system behavior out here.


--
Thanks,

David / dhildenb