public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Igor Stoppa <igor.stoppa@nokia.com>
To: "ext V, Sankara Narayanan" <sankara.narayanan.v@intel.com>
Cc: johannes@sipsolutions.net, linux-pm@lists.linux-foundation.org
Subject: RE: Power event notification patch
Date: Thu, 05 Jul 2007 16:20:58 +0300	[thread overview]
Message-ID: <1183641658.3619.14.camel@localhost.localdomain> (raw)
In-Reply-To: <67670A5CEA5C374B8E7B16D7DC55F9530124744C@bgsmsx413.gar.corp.intel.com>

On Thu, 2007-07-05 at 18:39 +0530, ext V, Sankara Narayanan wrote:
> Guys,
> 
> You really can't depend on this if your application want to execute some
> 10000 lines of code. What I told is the app will have enough time to do
> some minimal work (say wanna do some cleanup which is of the order of
> 100 instructions or so). The go-to-suspend time is of the order of 2.x
> seconds. So, we can really do it.
> 
> Igor,
> I really do not understand what you mean by NACK (is it No ACK? If yes,
> please explain)

You are not expecting another app (say app2) to veto (No ACK) what your
master app (app1) has decided.

You only want app 2 to take care of itself so that its internal state
(the part you care about) will be available for restoring, should something
go bad. That, btw, is the same situation as with the OOM killer.


Your assumption to do something when the system starts to go in suspended
mode is dangerous and, as i said, not really safe.

Instead, if you save your application state when it changes (i.e. the user
opens a new tab in the browser) you will be able to restore the application
state in _any_ case, not just for a failed suspend.

It's cleaner, deterministic and doesn't introduce artificial dependencies
on kernelspace.
Keep also in mind that your numbers are probably bogus on different
architectures and your solution might not work (yes, i've seen your email
address but that doesn't justify the creation of arch-specific coded when
it's not necessary ;-)

-- 
Cheers, Igor

Igor Stoppa <igor.stoppa@nokia.com>
(Nokia Multimedia - CP - OSSO / Helsinki, Finland)

  parent reply	other threads:[~2007-07-05 13:20 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
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 [this message]
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=1183641658.3619.14.camel@localhost.localdomain \
    --to=igor.stoppa@nokia.com \
    --cc=johannes@sipsolutions.net \
    --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