From: Pavel Machek <pavel@ucw.cz>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Linux PM list <linux-pm@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 3/3] PM / hibernate: Recycle safe pages after image restoration
Date: Mon, 15 Aug 2016 16:33:49 +0200 [thread overview]
Message-ID: <20160815143349.GB29447@amd> (raw)
In-Reply-To: <3432840.yEuDW8huOO@vostro.rjw.lan>
On Thu 2016-08-11 23:23:20, Rafael J. Wysocki wrote:
> 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.
Well, it looked like 3/3 just added code and did not remove anything,
so I fail to see how it makes code easier to follow...
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2016-08-15 14:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-29 0:58 [PATCH 0/3] PM / hibernate: Image restore code improvements Rafael J. Wysocki
2016-06-29 1:00 ` [PATCH v2 1/3] PM / hibernate: Do not free preallocated safe pages during image restore Rafael J. Wysocki
2016-06-29 1:02 ` [PATCH v2 RESEND 2/3] PM / hibernate: Simplify mark_unsafe_pages() Rafael J. Wysocki
2016-06-29 1:05 ` [PATCH v2 3/3] PM / hibernate: Recycle safe pages after image restoration Rafael J. Wysocki
2016-08-11 21:06 ` Pavel Machek
2016-08-11 21:23 ` Rafael J. Wysocki
2016-08-15 14:33 ` Pavel Machek [this message]
2016-08-15 23:16 ` Rafael J. Wysocki
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=20160815143349.GB29447@amd \
--to=pavel@ucw.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.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.
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).