linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Luigi Semenzato <semenzato@google.com>
Cc: James Morse <james.morse@arm.com>,
	Linux Memory Management List <linux-mm@kvack.org>,
	 Bas Nowaira <bassem@google.com>, Geoff Pike <gpike@google.com>,
	 Linux PM <linux-pm@vger.kernel.org>
Subject: Re: hibernation memory usage
Date: Tue, 8 Oct 2019 17:39:18 +0200	[thread overview]
Message-ID: <CAJZ5v0jCb5jLVQ2Oj0bSNf987apxi7SHx4duX9eALMD6QQXB+w@mail.gmail.com> (raw)
In-Reply-To: <CAA25o9TpBm+LNwVccTaUng4vQ1Q9_Wz2QftGho7DG_+26CCYoA@mail.gmail.com>

On Tue, Oct 8, 2019 at 5:26 PM Luigi Semenzato <semenzato@google.com> wrote:
>
> Thank you for your reply!
>
> I understand the need for saving all state, not just process/task
> state.  But for many of the systems that could benefit from
> hibernation, the majority of RAM is taken by user processes (I am
> thinking laptops).  It should be possible to copy their anonymous
> pages to disk more or less directly, without making an extra copy like
> it's done for all other pages.  I am not sure what happens with kernel
> tasks, but they don't have anonymous pages (that I know).
>
> I am curious to know how/if hibernation is currently used in practice.
> It doesn't seem practical to require that user processes take less
> than 50% of RAM at all times.  There may be special cases in which the
> restriction can be achieved by terminating non-essential processes
> before hibernating, but I don't know of any.
>
> I would also like to know how much work it might take to avoid the
> extra copy of the anonymous pages of frozen processes.

Whatever doesn't fit into 50% of RAM needs to be swapped out before
hibernation.  The efficiency of that depends on the swap handling code
and the underlying hardware.  If that is efficient enough overall,
trying to avoid it altogether isn't going to make much of a
difference.


  reply	other threads:[~2019-10-08 15:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-03 17:16 hibernation memory usage Luigi Semenzato
2019-10-08 10:33 ` James Morse
2019-10-08 15:26   ` Luigi Semenzato
2019-10-08 15:39     ` Rafael J. Wysocki [this message]
2019-10-08 16:18       ` Luigi Semenzato
2019-10-08 20:10         ` Luigi Semenzato
2019-10-17 22:55           ` Luigi Semenzato
2019-10-19  1:49             ` Luigi Semenzato

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=CAJZ5v0jCb5jLVQ2Oj0bSNf987apxi7SHx4duX9eALMD6QQXB+w@mail.gmail.com \
    --to=rafael@kernel.org \
    --cc=bassem@google.com \
    --cc=gpike@google.com \
    --cc=james.morse@arm.com \
    --cc=linux-mm@kvack.org \
    --cc=linux-pm@vger.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;
as well as URLs for NNTP newsgroup(s).