From: Pavel Machek <pavel@ucw.cz>
To: joeyli <jlee@suse.com>
Cc: "Lee, Chun-Yi" <joeyli.kernel@gmail.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Len Brown <len.brown@intel.com>, Takashi Iwai <tiwai@suse.de>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] Hibernate: check unsafe page should not in e820 reserved region
Date: Thu, 7 Aug 2014 23:05:33 +0200 [thread overview]
Message-ID: <20140807210532.GA7816@Nokia-N900> (raw)
In-Reply-To: <20140807101734.GG26210@linux-rxt1.site>
On Thu 2014-08-07 18:17:34, joeyli wrote:
> On Thu, Aug 07, 2014 at 11:39:57AM +0200, Pavel Machek wrote:
> > > > Actually, if you are doing such a check... it makes sense to check for
> > > > _all_ the regions, nosave or not. If e820 map changed at all, it is
> > > > not safe to resume.
> > > > Pavel
> > >
> > > Currently nosave region only called register by e820 code, so hibernate's nosave region included e820
> > > reserved, ACPI data and ACPI NVS region.
> > >
> > > I thought hashing the start/end pfn of above regions is enough.
> >
> > If ammount of memory changed, for example, it is unsafe to
> > resume. So if you are doing the check, anyway, please hash
> > whole e820 table.
>
> There already have num_physpages in header for check the total physical page number.
Good, but if ammount of memory stayed the same, but offsets
changed (for example), resume is unsafe, too.
When I wrote that num_physpages check, I should have checked
whole e820 table, instead. (If anything at all changed there,
"new" kernel is running with wrong e820 info).
You seem to be in great position to fix that mistake now...
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:[~2014-08-07 21:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-04 15:23 [PATCH v2] Hibernate: check unsafe page should not in e820 reserved region Lee, Chun-Yi
2014-08-04 16:36 ` Takashi Iwai
2014-08-07 4:05 ` joeyli
2014-08-07 8:00 ` Pavel Machek
2014-08-07 8:52 ` joeyli
2014-08-07 9:39 ` Pavel Machek
2014-08-07 10:17 ` joeyli
2014-08-07 21:05 ` Pavel Machek [this message]
2014-08-08 4:24 ` joeyli
2014-08-08 7:05 ` Pavel Machek
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=20140807210532.GA7816@Nokia-N900 \
--to=pavel@ucw.cz \
--cc=jlee@suse.com \
--cc=joeyli.kernel@gmail.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=tiwai@suse.de \
/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).