linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bojan Smojver <bojan@rexursive.com>
To: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
	Linux PM list <linux-pm@vger.kernel.org>,
	linux-kernel@vger.kernel.org, bp@alien8.de
Subject: Re: [PATCH]: In kernel hibernation, suspend to both
Date: Mon, 14 May 2012 10:39:41 +1000	[thread overview]
Message-ID: <1336955981.2190.13.camel@shrek.rexursive.com> (raw)
In-Reply-To: <4FB048A0.9000601@linux.vnet.ibm.com>

On Mon, 2012-05-14 at 05:19 +0530, Srivatsa S. Bhat wrote:
> But does it carry out suspend-to-ram in full, or does it skip the
> PM_SUSPEND_PREPARE notifications?

As far as I can see, it simply does an ioctl that suspends to RAM
immediately, without any prior notifications.

> See my concerns about the preparation stage for suspend, in my other
> mail as well. I would have been less worried if we did things in full:
> 1. prepare for hibernation
> 2. create image
> 3. prepare for suspend
> 4. do suspend
> 5. do resume
> 6. unwind from hibernation code (like a failed hibernation).
> 
> Still no guarantees, but somewhat better.
> (consider what will happen if some code expects completion of an
> operation,
> successful or otherwise, before starting another.. and hence is
> unprepared
> for something like:
> hibernation prepare -> suspend prepare -> post suspend -> post
> hibernation)

What I'm trying to say is that from the point of view of the rest of the
code, suspend to RAM never happened. Only a failed hibernation happened.

At the point where we suspend to RAM, only the devices that are required
for image writing are actually active. The rest is frozen, including all
the processes, if I'm understanding things correctly.

If these devices can survive a failed image writing and are then be
subjected to unwinding by hibernation code, how would a suspend to RAM
right in the middle change any of this? Maybe it does - don't really
know...

> If we don't rework this thing carefully via a special notification for
> save-image-and-suspend like what Rafael suggested, and instead try to
> go
> with existing stuff as it is, I would definitely suggest putting this
> feature
> under something like CONFIG_EXPERIMENTAL ;-) 

Yeah, possibly.

-- 
Bojan


      reply	other threads:[~2012-05-14  0:39 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-08 22:22 [PATCH]: In kernel hibernation, suspend to both Bojan Smojver
2012-05-09  8:10 ` Srivatsa S. Bhat
2012-05-09 10:49   ` Bojan Smojver
2012-05-09 11:11     ` Bojan Smojver
2012-05-13 23:32       ` Srivatsa S. Bhat
2012-05-14  1:02         ` Bojan Smojver
2012-05-14  2:25           ` Alan Stern
2012-05-14  2:37             ` Bojan Smojver
2012-05-14  2:46               ` Bojan Smojver
2012-05-14  2:58                 ` Bojan Smojver
2012-05-14  7:45                   ` Bojan Smojver
2012-05-14 11:11                     ` Bojan Smojver
2012-05-14 11:47                       ` Bojan Smojver
2012-05-14 23:59                         ` Bojan Smojver
2012-05-15 14:26                           ` Alan Stern
2012-05-15 14:35                           ` Srivatsa S. Bhat
2012-05-15 17:42                             ` Rafael J. Wysocki
2012-05-15 18:23                               ` Srivatsa S. Bhat
2012-05-15 22:23                               ` Bojan Smojver
2012-05-21  4:38                                 ` Bojan Smojver
2012-05-21  8:18                                   ` Borislav Petkov
2012-05-21 13:18                                   ` Rafael J. Wysocki
2012-05-21 21:43                                     ` Bojan Smojver
2012-05-21 21:53                                       ` Rafael J. Wysocki
2012-05-21 21:55                                         ` Bojan Smojver
2012-05-24 14:51                                           ` Borislav Petkov
2012-05-25  2:02                                             ` Bojan Smojver
2012-05-31 16:23                                               ` Borislav Petkov
2012-06-01  2:03                                                 ` Bojan Smojver
2012-06-01  8:48                                                   ` Borislav Petkov
2012-06-01  8:57                                                     ` Bojan Smojver
2012-06-01  9:03                                                       ` Borislav Petkov
2012-06-16 13:59                                               ` Rafael J. Wysocki
2012-06-16 17:39                                                 ` Borislav Petkov
2012-06-16 19:17                                                   ` Rafael J. Wysocki
2012-06-16 20:09                                                     ` Bojan Smojver
2012-06-16 20:19                                                       ` Alan Stern
2012-06-16 23:07                                                         ` Borislav Petkov
2012-06-17  3:21                                                           ` Bojan Smojver
2012-06-17 10:31                                                             ` Borislav Petkov
2012-06-17 20:21                                                             ` Rafael J. Wysocki
2012-06-18  0:33                                                               ` Bojan Smojver
2012-06-18 12:32                                                                 ` Borislav Petkov
2012-06-18 20:29                                                                   ` Rafael J. Wysocki
2012-06-18 21:08                                                                     ` Bojan Smojver
2012-06-18 21:28                                                                       ` Rafael J. Wysocki
2012-06-19  2:09                                                                         ` Bojan Smojver
2012-06-19 14:21                                                                           ` Borislav Petkov
2012-06-19 14:32                                                                             ` Bojan Smojver
2012-06-19 20:23                                                                               ` Rafael J. Wysocki
2012-06-19 21:32                                                                                 ` Bojan Smojver
2012-06-19 22:35                                                                         ` Bojan Smojver
2012-05-12 21:47     ` Rafael J. Wysocki
2012-05-13  1:37       ` Bojan Smojver
2012-05-13 13:10         ` Rafael J. Wysocki
2012-05-13 23:18           ` Bojan Smojver
2012-05-13 23:49             ` Srivatsa S. Bhat
2012-05-14  0:39               ` Bojan Smojver [this message]

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=1336955981.2190.13.camel@shrek.rexursive.com \
    --to=bojan@rexursive.com \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=srivatsa.bhat@linux.vnet.ibm.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).