From: rjw@sisk.pl (Rafael J. Wysocki)
To: linux-arm-kernel@lists.infradead.org
Subject: [suspend/resume] Re: userspace notification from module
Date: Sat, 16 Jan 2010 23:26:09 +0100 [thread overview]
Message-ID: <201001162326.09092.rjw@sisk.pl> (raw)
In-Reply-To: <20100116221929.GB8425@elf.ucw.cz>
On Saturday 16 January 2010, Pavel Machek wrote:
> On Sat 2010-01-16 23:05:56, Rafael J. Wysocki wrote:
> > On Saturday 16 January 2010, Pavel Machek wrote:
> > > On Sat 2010-01-16 18:00:58, Stanislav Brabec wrote:
> > > > Eric Miao wrote:
> > > >
> > > > > And the other way we may need to look into what API the current userland
> > > > > apps on zaurus is depending on this 2.4 compatibility and make changes
> > > > > slowly to those apps.
> > > >
> > > > I guess that 2.4 compatibility is not an issue. Most modern Zaurus
> > > > distributions are even unable to run Sharp ROM compatible binaries.
> > > >
> > > > Distributions either stay on 2.4 kernel or use modern systems based on
> > > > modern kernel 2.6 API.
> > > >
> > > > Distributions that decided to migrate to kernel 2.6 are far from
> > > > finished state. Any change that allows to use modern applications using
> > > > standard kernel API is welcome.
> > >
> > > There is no API involved. It is just ... if you leave zaurus in
> > > init=/bin/bash mode, it must not kill the battery. Smart and
> > > currently implemented way to do that is to suspend.
> >
> > IMHO it should just plain shutdown in that case. Suspending doesn't really
> > solve the problem, because the battery is going to drain still. Unless you
> > mean suspend=hibernate, but I guess you don't.
>
> As I explained before, power consumption on suspend and hibernate and
> poweroff is equivalent on zaurus (7mA in all the cases -- sorry if I
> said uA before). And because it has 1800mAh battery, it means that
> even empty battery is going to last for a while. In practice, it works
> very well.
>
> (There are other reasons, having to do with internal li-ion resistances
> in aged and cold batteries.)
>
> > > That's counterexample to rjw, but it does not matter -- reasonable
> > > userland should never ever hit that, in a same way PCs should not hit
> > > emergency power cut...
> >
> > I don't really understand what you mean. The user space doesn't know the
> > battery state if the kernel doesn't tell it, AFAICS, so how exactly can it
> > predict the critical battery condition without the kernel notifying it?
>
> That was not the point I was trying to discuss. Yes, we need
> kernel<->user notification of battery critical.
>
> But on zaurus, correct action is to suspend (not hibernate and not
> poweroff) when battery is no longer able to supply enough power to
> keep system alive.
Why not to poweroff (just asking, I don't know that hardware)?
I guess we should at least do our best to keep filesystems in a consistent
state and suspend doesn't really guarantee this if the system remains on
battery power afterwards.
Rafael
next prev parent reply other threads:[~2010-01-16 22:26 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <686edb2c.6263643a.4b3f4a3b.b60b3@o2.pl>
[not found] ` <201001022201.04281.rjw@sisk.pl>
[not found] ` <20100109103212.GA1429@ucw.cz>
[not found] ` <201001091440.46434.rjw@sisk.pl>
2010-01-15 20:03 ` [suspend/resume] Re: userspace notification from module Pavel Machek
2010-01-15 22:14 ` Rafael J. Wysocki
2010-01-16 3:00 ` Eric Miao
2010-01-16 17:00 ` Stanislav Brabec
2010-01-16 18:12 ` Pavel Machek
2010-01-16 22:05 ` Rafael J. Wysocki
2010-01-16 22:19 ` Pavel Machek
2010-01-16 22:25 ` Pavel Machek
2010-01-16 22:31 ` Rafael J. Wysocki
2010-01-16 22:26 ` Rafael J. Wysocki [this message]
2010-01-17 13:07 ` Pavel Machek
2010-01-17 13:26 ` Russell King - ARM Linux
2010-01-19 5:15 ` Pavel Machek
2010-01-16 22:32 ` Russell King - ARM Linux
2010-01-16 18:12 ` Pavel Machek
2010-01-16 18:12 ` Pavel Machek
2010-01-16 22:07 ` Rafael J. Wysocki
2010-01-16 22:14 ` Pavel Machek
2010-01-16 22:21 ` Rafael J. Wysocki
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=201001162326.09092.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=linux-arm-kernel@lists.infradead.org \
/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).