![]() |
APMD-List: |
to APMD Home
|
Index:
[thread]
[date]
[subject]
[author]
From: Craig Markwardt <craigm@pcasun3.gsfc.nasa.gov> To : Avery Pennarun <apenwarr@worldvisions.ca> suspend rejections (was Re: apm proposed changes)Avery Pennarun writes: > On Sun, Sep 27, 1998 at 12:45:59PM -0400, Craig Markwardt wrote: > > > * ability for user-level code to *reject* a pending standby or > > suspend event. Very handy if something nasty is going on. > > Sounds interesting, although I don't know what kind of rules you'd use to > decide this. As far as I know (and I'll be happy if you correct me) the > only reasons you might want to avoid suspending are that the buffer cache > hasn't been flushed, or you haven't finished cleaning up yet... and > preventing those situations should be a kernel concern. Actually, there are lots of reasons that you might want to reject a suspend at the user level: - if AC power is connected - if CPU load is high - if network load is high - if modem is on line I think we should let the user decide their own power management policy, if possible. It shouldn't be built into the kernel. To assuage your fears: * Kernel-level drivers can already reject a pending standby or suspend. User-level programs are notified but not given a chance to agree or disagree: they *must* agree. The extra rejection logic in my kernel is only activated if a user-level program specifically rejects it. This option at least can give a user a way out. * It's not in the official kernel yet, so let's see what Stephen has to say. I haven't heard from him yet. > If we get too sneaky, we end up with laptops that refuse to shut down. Mine > does sometimes, and it's really annoying :( Hmmm. My laptop does that too. I actually did some intense snooping around, and found that there is a bug in my APM BIOS which gets tweaked under certain circumstances. I think having the ability to reject a suspend event might actually be good in those circumstances, if for example, you know that a suspend would crash the machine. [ This depends on a machine-to-machine basis. ] Craig Index: [thread] [date] [subject] [author] |