public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Linux-pm mailing list <linux-pm@lists.linux-foundation.org>
Subject: Re: [RFC] PM: Add PM_RESUME_PREPARE and PM_POST_RESUME notifiers
Date: Wed, 31 Oct 2007 23:09:00 +0100	[thread overview]
Message-ID: <200710312309.01306.rjw@sisk.pl> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0710311707250.8202-100000@iolanthe.rowland.org>

On Wednesday, 31 October 2007 22:11, Alan Stern wrote:
> On Tue, 30 Oct 2007, Rafael J. Wysocki wrote:
> 
> > > Drivers might want to do different things at the beginning of
> > > hibernation and the beginning of a restore.
> > > 
> > > Alternatively, the user interface can be changed.  The current 
> > > organization is slightly illogical; there should be different ioctls 
> > > for prepare-to-create-snapshot and prepare-to-restore-snapshot instead 
> > > of a single SNAPSHOT_FREEZE for both.  How about adding RESTORE_FREEZE 
> > > and RESTORE_UNFREEZE; does this sound good?
> > 
> > Hm, we could define separate FREEZE ioctls for restore, but if they end up
> > doing the same as the analogous snapshot ones, they'll be somewhat redundant
> > ...
> 
> How do you like this version of the patch then?  Redundancy is kept to 
> a minimum.
> 
> (Strictly speaking, we should have two different notification codes for 
> PM_POST_HIBERNATION: one for use after the atomic snapshot has been 
> created and one for use after it has been restored.  But I'm not going 
> to worry about that right now.)

IIRC, the notifiers are not called after creating the image.  Do you think that
they should be called at that time?  If so, then why?

As far as the patch is concerned, I'd prefer not to add new ioctls(), mainly
because there's userland out there that doesn't know about them and we can't
make people switch overnight.  I'd prever to move the notifier calls to
snapshot_open() and snapshot_release().

Greetings,
Rafael

  reply	other threads:[~2007-10-31 22:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-29 21:30 [RFC] PM: Add PM_RESUME_PREPARE and PM_POST_RESUME notifiers Alan Stern
2007-10-29 22:34 ` Rafael J. Wysocki
2007-10-30 14:52   ` Alan Stern
2007-10-30 21:15     ` Rafael J. Wysocki
2007-10-31 21:11       ` Alan Stern
2007-10-31 22:09         ` Rafael J. Wysocki [this message]
2007-11-01 14:40           ` Alan Stern
2007-11-01 15:13             ` Rafael J. Wysocki
2007-11-01 19:31               ` [PATCH] PM: Add PM_RESTORE_PREPARE and PM_POST_RESTORE notifiers Alan Stern

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=200710312309.01306.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=stern@rowland.harvard.edu \
    /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