Re: [PATCH v4] mm: Enable suspend-only swap spaces
From: Karel Zak
Date: Fri Jul 30 2021 - 09:16:16 EST
On Mon, Jul 26, 2021 at 05:12:46PM -0700, Evan Green wrote:
> Swap regions with SWAP_FLAG_HIBERNATE_ONLY set will not appear in
> /proc/meminfo under SwapTotal and SwapFree, since they are not usable as
> general swap. These regions do still appear in /proc/swaps.
Off-topic, /proc/swaps is in the same situation like /proc/mounts years ago ...
It does not provide all important information like SWAP_FLAG_DISCARD_PAGES
SWAP_FLAG_DISCARD_ONCE and SWAP_FLAG_HIBERNATE_ONLY flags.
Users will not able to differentiate between regular and hibernate-only
devices in "swapon" or "cat /proc/swaps" output ;-(
It would be nice to have /proc/swapsinfo with extendible "flags" column.
Karel Zak <kzak@xxxxxxxxxx>