From: Chris Murphy <lists@colorremedies.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Michal Hocko <mhocko@kernel.org>,
Luigi Semenzato <semenzato@google.com>,
Chris Murphy <lists@colorremedies.com>,
Linux Memory Management List <linux-mm@kvack.org>,
Linux PM <linux-pm@vger.kernel.org>
Subject: Re: is hibernation usable?
Date: Fri, 21 Feb 2020 02:46:51 -0700 [thread overview]
Message-ID: <CAJCQCtQ1FrAZpBbXPXcJwb4eTaCH5j9+gCStrX_hKwAEoLSK-g@mail.gmail.com> (raw)
In-Reply-To: <CAJZ5v0h5MnpK9YjO+Z7_M1Cj8tup4qPriALx-EHt4ypbmCWfUw@mail.gmail.com>
On Fri, Feb 21, 2020 at 2:04 AM Rafael J. Wysocki <rafael@kernel.org> wrote:
>
> My understanding of the problem is that the size of swap is
> (theoretically) sufficient, but it is not used as expected during the
> preallocation of image memory.
Right. I have no idea how locality of pages is determined in the swap
device. But if it's sufficiently fragmented such that contiguous free
space for a hibernation image is not sufficient, then hibernation
could fail.
> It was stated in one of the previous messages (not in this thread,
> cannot find it now) that swap (of the same size as RAM) was activated
> (swapon) right before hibernation, so theoretically that should be
> sufficient AFAICS.
I mentioned it as an idea floated by systemd developers. I'm not sure
if it's mentioned elsewhere. Some folks wonder if such functionality
could be prone to racing.
https://lore.kernel.org/linux-mm/CAJCQCtSx0FOX7q0p=9XgDLJ6O0+hF_vc-wU4KL=c9xoSGGkstA@mail.gmail.com/T/#m4d47d127da493f998b232d42d81621335358aee1
Another idea that's been suggested for a while is formally separating
hibernation and paging into separate files (or partitions).
a. Guarantees hibernation image has the necessary contiguous free space.
b. Might be easier to create (or even obviate) a sane interface for
hibernation images in swapfiles; that is, if it were a dedicated
hibernationfile rather than being inserted in a swapfile. Right now
that interface doesn't exist, so e.g. on Btrfs while it can support
swapfiles and hibernation images, the offset has to be figured out
manually so resume can succeed.
https://github.com/systemd/systemd/issues/11939#issuecomment-471684411
--
Chris Murphy
next prev parent reply other threads:[~2020-02-21 9:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-11 19:50 Chris Murphy
2020-02-11 22:23 ` Luigi Semenzato
2020-02-20 2:54 ` Chris Murphy
2020-02-20 2:56 ` Chris Murphy
[not found] ` <CAA25o9T2wwqoopoNRySdZoYkD+vtqRPsB1YPnag=TkOp5D9sYA@mail.gmail.com>
2020-02-20 17:38 ` Luigi Semenzato
2020-02-21 8:49 ` Michal Hocko
2020-02-21 9:04 ` Rafael J. Wysocki
2020-02-21 9:36 ` Michal Hocko
2020-02-21 17:13 ` Luigi Semenzato
2020-02-21 9:46 ` Chris Murphy [this message]
[not found] ` <CAJCQCtScZg1CP2WTDoOy4-urPbvP_5Hw0H-AKTwHugN9YhdxLg@mail.gmail.com>
2020-02-20 19:44 ` Luigi Semenzato
2020-02-20 21:48 ` Chris Murphy
2020-02-27 6:43 ` Chris Murphy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJCQCtQ1FrAZpBbXPXcJwb4eTaCH5j9+gCStrX_hKwAEoLSK-g@mail.gmail.com \
--to=lists@colorremedies.com \
--cc=linux-mm@kvack.org \
--cc=linux-pm@vger.kernel.org \
--cc=mhocko@kernel.org \
--cc=rafael@kernel.org \
--cc=semenzato@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox