lkml.org 
[lkml]   [2021]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] mm: Enable suspend-only swap spaces
On Fri,  9 Jul 2021 10:50:48 -0700 Evan Green <evgreen@chromium.org> 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.
>
> Swap regions with SWAP_FLAG_NOSWAP set will not appear in /proc/meminfo
> under SwapTotal and SwapFree, since they are not usable as general swap.
>

This patch doesn't appear to set SWAP_FLAG_NOSWAP anywhere. Perhaps
there's another patch somewhere which changes the hibernation code? If
so, can we please have both patches in a series?

Once we have a description of how this thing gets set, please let's
discuss what happens if someone tries to enable generic swap onto that
device after hibernation has set SWAP_FLAG_NOSWAP (I'm basically
guessing now). Will it work? Is there a backward-compatibility issue
here?

\
 
 \ /
  Last update: 2021-07-10 00:20    [W:0.576 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site