all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Ivan Vilata i Balaguer <ivan@selidor.net>
Cc: 59746-done@debbugs.gnu.org
Subject: bug#59746: [DOCUMENTATION] [PATCH] doc: Introduce using Swap Space for hibernation, with an example.
Date: Thu, 05 Jan 2023 23:01:07 +0100	[thread overview]
Message-ID: <87tu141w0s.fsf_-_@gnu.org> (raw)
In-Reply-To: <Y6L5O7vAqok7+U10@sax> (Ivan Vilata i. Balaguer's message of "Wed, 21 Dec 2022 13:16:59 +0100")

[-- Attachment #1: Type: text/plain, Size: 1130 bytes --]

Hi,

Ivan Vilata i Balaguer <ivan@selidor.net> skribis:

> This patch replaces the previous one and enhances it with several minor fixes
> and the missing information related to computing the swap file offset, as
> discussed [in the guix-devel thread][1].
>
> [1]: https://lists.gnu.org/archive/html/guix-devel/2022-12/msg00028.html
>
> Thanks and cheers!
>
> -- 
> Ivan Vilata i Balaguer -- https://elvil.net/
>
> From e95d79ef8c466e495c730f722b7aefc4d2d5969f Mon Sep 17 00:00:00 2001
> From: Ivan Vilata-i-Balaguer <ivan@selidor.net>
> Date: Wed, 21 Dec 2022 13:08:48 +0100
> Subject: [PATCH] doc: Introduce using swap space for hibernation, with
>  examples.
>
> * doc/guix.texi (Swap Space): Add a concise introduction to hibernation and
> specifying a swap space to the kernel to make resume work.  Mention space
> requirements and the need of an offset for swap files.  Include a trivial
> example on how to set up a mapped swap volume for hibernation and another one
> for a swap file, including how to compute the file offset.

Very nice!  Applied with the tweaks below.

Thanks,
Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 2175 bytes --]

diff --git a/doc/guix.texi b/doc/guix.texi
index 9a74ae64d6..293c3016aa 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -17109,14 +17109,18 @@ should consider ease of use when deciding between them.  Partitions are
 allocated at disk formatting time (logical volumes notwithstanding),
 whereas files can be allocated and deallocated at any time.
 
-A swap space is also required in order to hibernate a system using the
-Linux kernel.  Hibernation (also called suspend to disk) uses at most
-half the size of the RAM in the configured swap space.  The kernel needs
-to know about the swap space to be used to resume from hibernation on
-boot (via a kernel argument).  When using a swap file, its offset in the
-device holding it also needs to be given to the kernel, but that value
-has to be updated if the file is initialized again as swap (e.g. because
-its size was changed).
+@cindex hibernation
+@cindex suspend to disk
+Swap space is also required to put the system into @dfn{hibernation}
+(also called @dfn{suspend to disk}), whereby memory is dumped to swap
+before shutdown so it can be restored when the machine is eventually
+restarted.  Hibernation uses at most half the size of the RAM in the
+configured swap space.  The Linux kernel needs to know about the swap
+space to be used to resume from hibernation on boot (@i{via} a kernel
+argument).  When using a swap file, its offset in the device holding it
+also needs to be given to the kernel; that value has to be updated if
+the file is initialized again as swap---e.g., because its size was
+changed.
 
 Note that swap space is not zeroed on shutdown, so sensitive data (such
 as passwords) may linger on it if it was paged out.  As such, you should
@@ -17215,7 +17219,7 @@ select the file system in an elegant fashion!
          %default-kernel-arguments))
 @end lisp
 
-The previous snippet of an @code{operating-system} declaration enables
+The above snippet of an @code{operating-system} declaration enables
 the mapped device @file{/dev/mapper/my-swap} (which may be part of an
 encrypted device) as swap space, and tells the kernel to use it for
 hibernation via the @code{resume} kernel argument

      reply	other threads:[~2023-01-05 22:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-01 17:17 [bug#59746] [DOCUMENTATION] [PATCH] doc: Introduce using Swap Space for hibernation, with an example Ivan Vilata i Balaguer
     [not found] ` <handler.59746.B.166991506631585.ack@debbugs.gnu.org>
2022-12-21 12:16   ` Ivan Vilata i Balaguer
2023-01-05 22:01     ` Ludovic Courtès [this message]

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=87tu141w0s.fsf_-_@gnu.org \
    --to=ludo@gnu.org \
    --cc=59746-done@debbugs.gnu.org \
    --cc=ivan@selidor.net \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.