From: Felipe Alfaro Solana <felipe_alfaro@linuxmail.org>
To: Pavel Machek <pavel@suse.cz>
Cc: Patrick Mochel <mochel@osdl.org>,
George Anzinger <george@mvista.com>,
John stultz <johnstul@us.ibm.com>,
kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [pm] fix time after suspend-to-*
Date: Tue, 28 Oct 2003 15:30:31 +0100 [thread overview]
Message-ID: <1067351431.1358.11.camel@teapot.felipe-alfaro.com> (raw)
In-Reply-To: <20031028093233.GA1253@elf.ucw.cz>
On Tue, 2003-10-28 at 10:32, Pavel Machek wrote:
> > Many userspace applications are not prepared for suspension, like
> > Evolution. When suspending the machine for a long time, all IMAP
> > sessions are broken as their counterpart TCP sockets timeout. While
> > resuming, Evolution is unable to handle this condition and simply
> > informs the network connection has been dropped.
> >
> > What about sending the SIGPWR signal to all userspace processes before
> > suspending so applications like Evolution can be improved to handle this
> > signal, drop their IMAP connections and then, when resuming, reestablish
> > them?
>
> Not sure... We do not want applications to know. Certainly we can't
> send a signal; SIGPWR already has some meaning and it would be bad to
> override it.
OK, maybe using SIGPWR is not a good idea, but some userspace
applications need to know when the system is going to sleep. Even more,
userspace apps should be able to tell the kernel whether suspending the
system at a given moment is a good idea or not.
Examples:
1. Network connections must be reestablished. A userspace program can't
try to automatically reestablish a broken TCP connection for no apparent
reason. A broken TCP connection could be the cause of an overloaded or
broken server/service. If we do not inform userspace processes that the
system is going to sleep (or that the system has been brought up from
standby), they will blindly try to restore TCP connections back, even
when the remote server is broken, generating a lot of unnecesary
traffic.
2. Sound: I've been unable to suspend via APM with the Yamaha YMFPCI
driver loaded. I need to unload it, but I can't unload it if there is
some app using the sound driver. Before going to sleep, sound-aware apps
could be informed that the system is being put to sleep so that they
stop playing sound gracefully. Thus, the sound driver could be unloaded.
3. CD/DVD burners: Some userspace apps should be able to try to avoid
suspending the system. Imagine what could happen if average joe user
tries to suspend while burning a CD. The CD recording app should be able
to notify the kernel that a real-time sensitive operation is being taken
place. A policy-based decision system could take the responsibility to
prevent the system from entering suspension or ignore the userspace
application and force the suspend, for example, to prevent losing data
when a laptop is really, really low on batteries.
Don't know if I'm able to convince you ;-)
next prev parent reply other threads:[~2003-10-28 14:30 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-22 23:33 Pavel Machek
2003-10-22 23:52 ` john stultz
2003-10-23 8:17 ` Pavel Machek
2003-10-23 20:23 ` George Anzinger
2003-10-23 20:55 ` john stultz
2003-10-23 23:09 ` George Anzinger
2003-10-23 23:38 ` Pavel Machek
2003-10-24 0:29 ` john stultz
2003-10-24 0:39 ` john stultz
2003-10-24 2:10 ` George Anzinger
2003-10-24 7:48 ` Pavel Machek
2003-10-27 23:24 ` George Anzinger
2003-10-27 23:43 ` Patrick Mochel
2003-10-28 1:35 ` Nigel Cunningham
2003-10-28 8:33 ` Felipe Alfaro Solana
2003-10-28 9:32 ` Pavel Machek
2003-10-28 11:41 ` Stephen Rothwell
2003-10-28 12:29 ` Pavel Machek
2003-10-28 12:39 ` Stephen Rothwell
2003-10-28 22:23 ` Peter Chubb
2003-10-29 2:24 ` Valdis.Kletnieks
2003-10-29 9:43 ` Pavel Machek
2003-10-28 14:30 ` Felipe Alfaro Solana [this message]
2003-10-28 17:28 ` Pavel Machek
2003-10-28 20:16 ` Felipe Alfaro Solana
2003-10-28 21:13 ` Andreas Schwab
2003-10-28 21:29 ` George Anzinger
2003-10-29 9:38 ` Pavel Machek
2003-10-29 11:28 ` Gabriel Paubert
2003-10-29 11:55 ` PCI Bus error 6290 or 0290 Remus
2003-10-29 12:40 ` Meelis Roos
2003-10-29 12:49 ` Remus
2003-10-29 20:42 ` [pm] fix time after suspend-to-* George Anzinger
2003-10-30 9:02 ` Pavel Machek
2003-10-28 15:21 ` Valdis.Kletnieks
2003-10-28 17:26 ` Pavel Machek
2003-10-28 18:20 ` Patrick Mochel
2003-10-28 19:36 ` Valdis.Kletnieks
2003-10-28 20:19 ` Felipe Alfaro Solana
2003-10-24 7:49 ` Pavel Machek
2003-10-23 23:40 ` Pavel Machek
2003-10-27 22:43 ` Patrick Mochel
2003-10-22 23:57 ` Måns Rullgård
2003-10-29 8:20 Mathias Fröhlich
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=1067351431.1358.11.camel@teapot.felipe-alfaro.com \
--to=felipe_alfaro@linuxmail.org \
--cc=george@mvista.com \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mochel@osdl.org \
--cc=pavel@suse.cz \
/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
all inboxes | Powered by JetHome®