From: Pavel Machek <pavel@ucw.cz>
To: Todd Poynor <tpoynor@mvista.com>
Cc: Greg KH <greg@kroah.com>,
mochel@digitalimplant.org,
linux-hotplug-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: Hotplug events for system suspend/resume
Date: Sat, 15 May 2004 02:59:54 +0000 [thread overview]
Message-ID: <20040515025953.GA460@elf.ucw.cz> (raw)
In-Reply-To: <40A17251.2000500@mvista.com>
Hi!
> >I still do not see the need for this. As a user, you caused the
> >suspend/resume event to happen, why get notified of it again? :)
>
> The idea is to notify the "power management application" of impending
> suspend and just-completed resume, regardless of who or what asked for
> the suspend. Actions taken at suspend might include dropping network
> connections and saving application state to stable storage.
>
> The reasons for which this was requested of me as a kernel-to-userspace
> notifier, that I am aware of, are:
>
> (a) some embedded platforms currently trigger suspend within kernel
> drivers (in response to a button press or some sort of device
>timeout).
I believe kernel should userspace "button was pressed", and let
userspace ask it for suspend.
> (b) the system designer wants to make sure certain actions are always
> taken regardless of the interface used to suspend (not only in the case
> of a certain application that incorporates these actions and triggers
> the suspend via the standard interfaces at the appropriate time). For
> example, a user manually enters a command from a shell prompt.
User should not manually do "echo something > /proc/acpi/sleep". For
embedded platforms, it should be rather easy to ensure user does not
do that, right?
OTOH, it might make sense to define that /etc/rc.d/suspend/* has to be
run before suspend and /etc/rc.d/resume/* has to be run after suspend;
by whoever who does suspend.
suspend-vetoing is pretty bad idea if your battery is running down. I
believe shutdown does it right: kill -15 -1; sleep 1; kill -9
-1. I.e. let apps know one second before suspend, but do not let them
veto it.
Pavel
--
When do you have heart between your knees?
-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id%62&alloc_ida84&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next prev parent reply other threads:[~2004-05-15 2:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20040511010015.GA21831@dhcp193.mvista.com>
2004-05-11 23:00 ` Hotplug events for system suspend/resume Greg KH
2004-05-12 0:39 ` Todd Poynor
2004-05-12 2:16 ` Nigel Cunningham
2004-05-12 2:44 ` Todd Poynor
2004-05-12 3:59 ` Nigel Cunningham
2004-05-12 19:36 ` Todd Poynor
2004-05-15 3:03 ` Pavel Machek
2004-05-12 15:08 ` Greg KH
2004-05-13 22:46 ` Tim Bird
2004-05-13 23:28 ` Greg KH
2004-05-15 2:59 ` Pavel Machek [this message]
2004-05-12 18:52 ` Grover, Andrew
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=20040515025953.GA460@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=greg@kroah.com \
--cc=linux-hotplug-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mochel@digitalimplant.org \
--cc=tpoynor@mvista.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).