public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
To: Pavel Machek <pavel@suse.cz>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
	Zhang Rui <rui.zhang@intel.com>,
	linux-acpi <linux-acpi@vger.kernel.org>,
	linux-pm <linux-pm@lists.linux-foundation.org>,
	Andi Kleen <andi@firstfloor.org>,
	linux-kernel <linux-kernel@zh-kernel.org>
Subject: Re: [linux-pm] [RFC PATCH 2/4] ACPI: introduce the mechanism to save/restore ACPI NVS memory
Date: Wed, 9 Jul 2008 11:58:50 -0300	[thread overview]
Message-ID: <20080709145850.GA18230@khazad-dum.debian.net> (raw)
In-Reply-To: <20080708193558.GC8694@ucw.cz>

On Tue, 08 Jul 2008, Pavel Machek wrote:
> > >  static int acpi_hibernation_begin(void)
> > >  {
> > >  	acpi_target_sleep_state = ACPI_STATE_S4;
> > >  
> > > -	return 0;
> > > +	/* allocate pages for ACPI NVS memory before swsusp_shrink_memory */
> > > +	return acpi_allocate_nvs_pages();
> > 
> > I think we shouldn't abort hibernation because of that.
> > 
> > This may be an emergency hibernation due to critical battery status and we
> > surely don't want to about that.
> 
> I disagree here. If spec says 'you must save this', and we don't, we
> are asking for subtle, dangerous, and very hard to repoduce problems.

Indeed.  Especially after we start doing the right thing, and vendors WILL
expect us to do the right thing (save the NVS memory) *always*, not just
"almost always".

If you don't want the hibernate path to fail because of OOM, have whatever
memory it needs pre-allocated, set aside and protected at startup so that it
will always be there when you need to hibernate.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

  reply	other threads:[~2008-07-09 14:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-03  2:24 [RFC PATCH 2/4] ACPI: introduce the mechanism to save/restore ACPI NVS memory Zhang Rui
2008-07-03  2:46 ` Zhang Rui
2008-07-03 23:34 ` Rafael J. Wysocki
2008-07-08 19:35   ` [linux-pm] " Pavel Machek
2008-07-09 14:58     ` Henrique de Moraes Holschuh [this message]
2008-07-09 20:26       ` Rafael J. Wysocki
2008-07-09 22:44         ` Pavel Machek
2008-07-10  1:06         ` Zhang Rui
2008-07-10 10:46           ` 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=20080709145850.GA18230@khazad-dum.debian.net \
    --to=hmh@hmh.eng.br \
    --cc=andi@firstfloor.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@zh-kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=pavel@suse.cz \
    --cc=rjw@sisk.pl \
    --cc=rui.zhang@intel.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