From: Igor Stoppa <igor.stoppa@nokia.com>
To: "ext V, Sankara Narayanan" <sankara.narayanan.v@intel.com>
Cc: linux-pm@lists.linux-foundation.org
Subject: RE: Power event notification patch
Date: Thu, 05 Jul 2007 15:54:49 +0300 [thread overview]
Message-ID: <1183640089.3619.5.camel@localhost.localdomain> (raw)
In-Reply-To: <67670A5CEA5C374B8E7B16D7DC55F95301247436@bgsmsx413.gar.corp.intel.com>
Hi,
On Thu, 2007-07-05 at 18:14 +0530, ext V, Sankara Narayanan wrote:
> Well, say I have two applications, say app1 and app2. App 1 initiates a
> suspend-to-RAM. How will app2 come to know the system is going to sleep.
Apparently you are not concernedd about giving a NACK, just let other
apps know that the transition is going to happen.
And you have admitted that it's not possible to have a deterministic
response (apps have "some" time to do "something").
If your system relies on such weak mechanism, it's well broken.
An application that wants to keep its state saved somewhere safe
(meaning that it can survive a powercycle) should store it asap, not
when something risky might happen.
> Only way is app1 needs to inform/broadcast that the application has
> initiates the sleep or the system is going to sleep. In that case, every
> application which initiates a sleep has to implement this. Quoting your
> example, the user who has proper credentials (using whatever application
> he uses to initiate a sleep) should tell each application when going to
> sleep. Even when we use pm-utilities, please understand that the
> kernel/power/main.c's enter_state executes the first call/instruction to
> prepare the system for the low power state.
>
> So, it is apt to keep it in kernel space.
Not really, it belongs to userspace, and only to those apps that need
it.
Implement a library to make it in a standardized, but keep it away from
kernelspace. Actually I think you can get already something similar from
Hildon.
Have you checked that?
cheers,
igor
> Thanks,
> Sankar.
>
> -----Original Message-----
> From: Oliver Neukum [mailto:oliver@neukum.org]
> Sent: Thursday, July 05, 2007 6:05 PM
> To: V, Sankara Narayanan
> Cc: linux-pm@lists.linux-foundation.org
> Subject: Re: [linux-pm] Power event notification patch
>
> Am Donnerstag, 5. Juli 2007 schrieb V, Sankara Narayanan:
> > 1. Isn't it the kernel which is finally initiating a low power sleep
> > state? So, I added it in kernel/power/main.c where the kernel does all
> > the suspend related activities.
>
> Not really. The kernel takes the system to sleep if somebody with
> the proper credentials tells it to do so. The kernel doesn't take the
> initiative.
>
> So the most obvious place to do the notification is with the entity
> that initiates the sleep.
>
> > 2. To answer your second question, we really can't guarantee. But even
> > if you take Windows Vista (sorry linux enthusiasts for referring
> windows
> > here) or any other non-UNIX operating systems (which has this power
> > event notification), they really do not guarantee it. But, it is an
> > era-of-tera and the user space applications can do some minimal work
> > like saving the app's last state in a .tmp file or so (like firefox if
> > closed in an unclean way) to restore their state.
>
> Well, we want to better than that other OS.
>
> If you do this in user space, eg. the pm utilities, you can easily
> implement
> policies like waiting x seconds for the rest of the system to respond.
>
> Regards
> Oliver
>
> _______________________________________________
> linux-pm mailing list
> linux-pm@lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/linux-pm
--
Cheers, Igor
Igor Stoppa <igor.stoppa@nokia.com>
(Nokia Multimedia - CP - OSSO / Helsinki, Finland)
next prev parent reply other threads:[~2007-07-05 12:54 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-05 12:01 Power event notification patch V, Sankara Narayanan
2007-07-05 12:08 ` Oliver Neukum
2007-07-05 12:17 ` V, Sankara Narayanan
2007-07-05 12:34 ` Oliver Neukum
2007-07-05 12:44 ` V, Sankara Narayanan
2007-07-05 12:51 ` Oliver Neukum
2007-07-05 12:54 ` Igor Stoppa [this message]
2007-07-05 13:09 ` V, Sankara Narayanan
2007-07-05 13:12 ` Johannes Berg
2007-07-05 13:17 ` V, Sankara Narayanan
2007-07-05 13:28 ` Johannes Berg
2007-07-05 13:33 ` V, Sankara Narayanan
2007-07-06 10:46 ` Johannes Berg
2007-07-05 13:56 ` Scott Preece
2007-07-05 13:22 ` Johannes Berg
2007-07-05 13:20 ` Igor Stoppa
2007-07-05 13:39 ` V, Sankara Narayanan
2007-07-05 13:46 ` Igor Stoppa
2007-07-05 12:48 ` Johannes Berg
2007-07-06 18:41 ` Greg KH
2007-07-09 4:34 ` V, Sankara Narayanan
2007-07-09 16:34 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2007-07-05 12:02 V, Sankara Narayanan
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=1183640089.3619.5.camel@localhost.localdomain \
--to=igor.stoppa@nokia.com \
--cc=linux-pm@lists.linux-foundation.org \
--cc=sankara.narayanan.v@intel.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