Mailinglist Archive: opensuse-factory (355 mails)

< Previous Next >
Re: [opensuse-factory] TW partitioning propsal swap
  • From: Chris Murphy <lists@xxxxxxxxxxxxxxxxx>
  • Date: Thu, 5 Mar 2020 16:20:27 -0700
  • Message-id: <CAJCQCtSQj0cL4BWz8TMdYYdofe+=++AuwpBDewTsfQQ+GD=UQA@mail.gmail.com>
On Thu, Mar 5, 2020 at 12:20 PM Brüns, Stefan
<Stefan.Bruens@xxxxxxxxxxxxxx> wrote:

On Donnerstag, 5. März 2020 18:06:52 CET Axel Braun wrote:
Hi,
I'm just installing TW on a new machine.
Partition proposal is 2GB for swap, with 16GB RAM.
Following that proposal hibernation should never work.

Wrong. It needs sufficient space to save the memory contents it can not
recreate otherwise, i.e. not disk buffers, no mmaped libraries, ...

You can determine the amount with
$> grep Active.anon /proc/meminfo
Active(anon): 6533548 kB

This can grow up to physicalmem+swap.

Right. To always have the ability to hibernate, the system needs:
a. dynamic enabling of a swap file of up to 50% RAM so that anonymouse
pages can be evicted to swap, thus freeing 50% RAM for the hibernation
image to be created
b. either a dedicated hibernation file; or a dynamically enabling yet
another swap file for the exclusive use of the hibernation image.

Tricky. But could be triggered by systemd hibernation.target only at
hibernate time, to enable the necessary swap files.


Note, you can also use a swap file to hibernate. The kernel also tries to
compress the memory before writing it to disk by default.

Swap files are supported on Btrfs since kernel 5.0. However, there
isn't a standard interface for determining the offset for the
hibernation image's location in the swap file.
https://lore.kernel.org/linux-btrfs/20200127192548.GA683123@vader/

Help wanted. But also work is needed to get a Secure Boot compatible
hibernation implementation, or it's pretty much pointless. x86_64
hardware comes with Secure Boot enabled since ages ago.


--
Chris Murphy
--
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-factory+owner@xxxxxxxxxxxx

< Previous Next >