Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1460797

Re: [PATCH v2 3/3] PM / hibernate: Recycle safe pages after image restoration

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From "Rafael J. Wysocki" <rjw@rjwysocki.net>
Newsgroups linux.kernel
Subject Re: [PATCH v2 3/3] PM / hibernate: Recycle safe pages after image restoration
Date Thu, 11 Aug 2016 23:20:01 +0200
Message-ID <s55yp-Op-5@gated-at.bofh.it> (permalink)
References <rPcaR-5YS-3@gated-at.bofh.it> <rPcaR-5YS-1@gated-at.bofh.it> <s55oJ-JH-7@gated-at.bofh.it>
User-Agent KMail/4.11.5 (Linux/4.8.0-rc1+; KDE/4.11.5; x86_64; ; )
MIME-Version 1.0
Content-Transfer-Encoding 7Bit
Content-Type text/plain; charset="utf-8"
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 30
Organization linux.* mail to news gateway
X-Original-Cc Linux PM list <linux-pm@vger.kernel.org>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
X-Original-Date Thu, 11 Aug 2016 23:23:20 +0200
X-Original-Message-ID <3432840.yEuDW8huOO@vostro.rjw.lan>
X-Original-References <2260927.OOWMYX738E@vostro.rjw.lan> <2448424.sR3JM3oiG3@vostro.rjw.lan> <20160811210615.GA28618@amd>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1460797

Show key headers only | View raw


On Thursday, August 11, 2016 11:06:15 PM Pavel Machek wrote:
> Hi!
> 
> > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > 
> > One of the memory bitmaps used by the hibernation image restoration
> > code is freed after the image has been loaded.
> > 
> > That is not quite efficient, though, because the memory pages used
> > for building that bitmap are known to be safe (ie. they were not
> > used by the image kernel before hibernation) and the arch-specific
> > code finalizing the image restoration may need them.  In that case
> > it needs to allocate those pages again via the memory management
> > subsystem, check if they are really safe again by consulting the
> > other bitmaps and so on.
> > 
> > To avoid that, recycle those pages by putting them into the global
> > list of known safe pages so that they can be given to the arch code
> > right away when necessary.
> 
> Ok, so you are trying to gain speed here? How much is the speedup?

This is more about making it easier to debug than about speed, TBH.

Avoiding bitmap operations and the mm subsystem involvement reduces
complexity and the number of places to look into in case something goes
wrong.

Thanks,
Rafael

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v2 3/3] PM / hibernate: Recycle safe pages after image  restoration Pavel Machek <pavel@ucw.cz> - 2016-08-11 23:10 +0200
  Re: [PATCH v2 3/3] PM / hibernate: Recycle safe pages after image restoration "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-11 23:20 +0200
    Re: [PATCH v2 3/3] PM / hibernate: Recycle safe pages after image  restoration Pavel Machek <pavel@ucw.cz> - 2016-08-15 16:40 +0200
      Re: [PATCH v2 3/3] PM / hibernate: Recycle safe pages after image restoration "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-08-16 01:20 +0200

csiph-web