Re: Attempted summary of suspend-blockers LKML thread

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Felipe Contreras
Date: Sunday, August 8, 2010 - 6:35 am

On Sat, Aug 7, 2010 at 9:28 AM, Ted Ts'o <tytso@mit.edu> wrote:

Exactly the same happens on Android.

Install one bad application, a request for PM permissions is made, you
click Yes. There's no difference at all.


No. You are assuming that PM permissions will be magically set
appropriately; that's not the case.

1) Install a bad application that requests PM permissions and is granted those

In this case you've gained nothing with user-space suspend blockers.

2) Install a good application that is not requesting PM permissions
(or is denied them)

Imagine this application requires expensive initialization, but
afterwards it only needs to send a small packet each minute to a
server. If this application forgets to request PM permission (or is
denied them), then it might miss the 1 minute mark, and would have to
re-initialize when a trusted app starts some work.

In this case suspend blockers cause more battery drain (and the
application to behave poorly).


There's only one case when suspend blockers might actually help:
a) The application is badly written (most probably a UI app drawing
when it shouldn't, which incidentally is not a problem in Android
since it's not multi-tasking)
b) The application is either not requesting, or denied PM permissions
c) The application is not affected too badly if it's not running all
the time (piggy-backing on trusted apps is ok)

For that it's much better to have a different strategy: all
applications are trusted, bad applications must be manually tagged.
Also, instead of having each and every user figure out which are the
bad apps, such information is more pertinent in the app store, where
users could vote when an app is bad PM-use or not; crowd-sourcing the
problem.

But guess what; once you have an app store system that can detect when
an application is badly written, why would you expose the users to
such bad apps?

In Maemo, 3rd party applications have to go trough a community review
(maemo.org extras testing) before they go into the main repository,
and this way bad applications (functionality or PM-wise) don't make it
to the general public.

Also, on mobile phones in general there are 3 kinds of applications.
1) desktop widgets: by far the ones with the most danger of drawing the battery
2) foreground UI apps: also have some danger, but only on
multi-tasking systems (not Android)
3) background services: usually don't do unnecessary work

Suspend blockers are mostly useful for 1), but desktop widgets are
platform-specific, so they are written for embedded anyway, and if you
are writing for embedded, there's no point in relying on
suspend-blockers; just write it PM optimized.

-- 
Felipe Contreras
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Sat Jul 31, 10:58 am)
Re: Attempted summary of suspend-blockers LKML thread, Arjan van de Ven, (Sat Jul 31, 9:52 pm)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Sat Jul 31, 10:48 pm)
Re: Attempted summary of suspend-blockers LKML thread, Arjan van de Ven, (Sat Jul 31, 11:01 pm)
Re: Attempted summary of suspend-blockers LKML thread, Mikael Abrahamsson, (Sat Jul 31, 11:24 pm)
Re: Attempted summary of suspend-blockers LKML thread, Mikael Abrahamsson, (Sat Jul 31, 11:49 pm)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Sun Aug 1, 12:12 pm)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Sun Aug 1, 12:27 pm)
Re: Attempted summary of suspend-blockers LKML thread, Arjan van de Ven, (Sun Aug 1, 3:47 pm)
Re: Attempted summary of suspend-blockers LKML thread, Arjan van de Ven, (Sun Aug 1, 3:49 pm)
Re: Attempted summary of suspend-blockers LKML thread, Arjan van de Ven, (Sun Aug 1, 4:00 pm)
Re: Attempted summary of suspend-blockers LKML thread, Rafael J. Wysocki, (Sun Aug 1, 4:02 pm)
Re: Attempted summary of suspend-blockers LKML thread, Arjan van de Ven, (Sun Aug 1, 4:12 pm)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Sun Aug 1, 6:10 pm)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Sun Aug 1, 8:03 pm)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Sun Aug 1, 8:04 pm)
Re: Attempted summary of suspend-blockers LKML thread, Arjan van de Ven, (Sun Aug 1, 8:06 pm)
Re: Attempted summary of suspend-blockers LKML thread, Arjan van de Ven, (Sun Aug 1, 9:05 pm)
Re: Attempted summary of suspend-blockers LKML thread, Florian Mickler, (Sun Aug 1, 10:34 pm)
Re: Attempted summary of suspend-blockers LKML thread, Florian Mickler, (Sun Aug 1, 10:44 pm)
Re: Attempted summary of suspend-blockers LKML thread, Florian Mickler, (Sun Aug 1, 11:40 pm)
Re: Attempted summary of suspend-blockers LKML thread, Florian Mickler, (Sun Aug 1, 11:53 pm)
Re: Attempted summary of suspend-blockers LKML thread, Florian Mickler, (Mon Aug 2, 12:23 am)
Re: Attempted summary of suspend-blockers LKML thread, Rafael J. Wysocki, (Mon Aug 2, 6:52 am)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Mon Aug 2, 7:00 am)
Re: Attempted summary of suspend-blockers LKML thread, Rafael J. Wysocki, (Mon Aug 2, 7:08 am)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Mon Aug 2, 7:09 am)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Mon Aug 2, 7:12 am)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Mon Aug 2, 1:36 pm)
Re: Attempted summary of suspend-blockers LKML thread, Rafael J. Wysocki, (Mon Aug 2, 2:33 pm)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Mon Aug 2, 3:27 pm)
Re: Attempted summary of suspend-blockers LKML thread, Rafael J. Wysocki, (Mon Aug 2, 3:40 pm)
Re: Attempted summary of suspend-blockers LKML thread, Arve Hjønnevåg, (Mon Aug 2, 8:21 pm)
Re: Attempted summary of suspend-blockers LKML thread, Arve Hjønnevåg, (Mon Aug 2, 9:18 pm)
Re: Attempted summary of suspend-blockers LKML thread, Arve Hjønnevåg, (Mon Aug 2, 9:56 pm)
Re: Attempted summary of suspend-blockers LKML thread, Arve Hjønnevåg, (Mon Aug 2, 10:01 pm)
Re: Attempted summary of suspend-blockers LKML thread, Florian Mickler, (Tue Aug 3, 4:25 am)
Re: Attempted summary of suspend-blockers LKML thread, Florian Mickler, (Tue Aug 3, 4:26 am)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Tue Aug 3, 7:11 am)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Tue Aug 3, 8:41 am)
Re: Attempted summary of suspend-blockers LKML thread, Arve Hjønnevåg, (Tue Aug 3, 3:23 pm)
Re: Attempted summary of suspend-blockers LKML thread, Arve Hjønnevåg, (Tue Aug 3, 3:47 pm)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Tue Aug 3, 5:10 pm)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Tue Aug 3, 6:09 pm)
Re: Attempted summary of suspend-blockers LKML thread, Arjan van de Ven, (Tue Aug 3, 6:34 pm)
Re: Attempted summary of suspend-blockers LKML thread, Arve Hjønnevåg, (Tue Aug 3, 8:39 pm)
Re: Attempted summary of suspend-blockers LKML thread, Arjan van de Ven, (Tue Aug 3, 8:57 pm)
Re: Attempted summary of suspend-blockers LKML thread, Olivier Galibert, (Tue Aug 3, 9:58 pm)
Re: Attempted summary of suspend-blockers LKML thread, Arve Hjønnevåg, (Tue Aug 3, 10:22 pm)
Re: [linux-pm] Attempted summary of suspend-blockers LKML ..., Arve Hjønnevåg, (Tue Aug 3, 10:43 pm)
Re: Attempted summary of suspend-blockers LKML thread, Florian Mickler, (Tue Aug 3, 10:46 pm)
Re: Attempted summary of suspend-blockers LKML thread, Arve Hjønnevåg, (Tue Aug 3, 10:59 pm)
Re: Attempted summary of suspend-blockers LKML thread, Arve Hjønnevåg, (Tue Aug 3, 11:03 pm)
Re: Attempted summary of suspend-blockers LKML thread, Florian Mickler, (Tue Aug 3, 11:12 pm)
Re: Attempted summary of suspend-blockers LKML thread, Olivier Galibert, (Tue Aug 3, 11:28 pm)
Re: Attempted summary of suspend-blockers LKML thread, Arve Hjønnevåg, (Tue Aug 3, 11:50 pm)
Re: Attempted summary of suspend-blockers LKML thread, Arve Hjønnevåg, (Wed Aug 4, 12:10 am)
Re: Attempted summary of suspend-blockers LKML thread, Florian Mickler, (Wed Aug 4, 12:35 am)
Re: Attempted summary of suspend-blockers LKML thread, Rafael J. Wysocki, (Wed Aug 4, 4:47 am)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Wed Aug 4, 9:27 am)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Wed Aug 4, 9:32 am)
Re: Attempted summary of suspend-blockers LKML thread, Matthew Garrett, (Wed Aug 4, 9:35 am)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Wed Aug 4, 11:32 am)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Wed Aug 4, 11:39 am)
Re: Attempted summary of suspend-blockers LKML thread, Matthew Garrett, (Wed Aug 4, 11:55 am)
Re: Attempted summary of suspend-blockers LKML thread, Matthew Garrett, (Wed Aug 4, 12:21 pm)
Attempted summary of suspend-blockers LKML thread, take two, Paul E. McKenney, (Wed Aug 4, 12:57 pm)
Re: Attempted summary of suspend-blockers LKML thread, Matthew Garrett, (Wed Aug 4, 12:57 pm)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Wed Aug 4, 1:08 pm)
Re: Attempted summary of suspend-blockers LKML thread, Rafael J. Wysocki, (Wed Aug 4, 1:31 pm)
Re: Attempted summary of suspend-blockers LKML thread, Pavel Machek, (Wed Aug 4, 1:42 pm)
Re: Attempted summary of suspend-blockers LKML thread, Rafael J. Wysocki, (Wed Aug 4, 1:43 pm)
Re: Attempted summary of suspend-blockers LKML thread, Rafael J. Wysocki, (Wed Aug 4, 1:46 pm)
Re: Attempted summary of suspend-blockers LKML thread, Matthew Garrett, (Wed Aug 4, 1:48 pm)
Re: Attempted summary of suspend-blockers LKML thread, Rafael J. Wysocki, (Wed Aug 4, 1:51 pm)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Wed Aug 4, 1:51 pm)
Re: Attempted summary of suspend-blockers LKML thread, Matthew Garrett, (Wed Aug 4, 1:56 pm)
Re: Attempted summary of suspend-blockers LKML thread, Pavel Machek, (Wed Aug 4, 2:15 pm)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Wed Aug 4, 2:15 pm)
Re: Attempted summary of suspend-blockers LKML thread, Rafael J. Wysocki, (Wed Aug 4, 2:31 pm)
Re: Attempted summary of suspend-blockers LKML thread, Florian Mickler, (Wed Aug 4, 2:39 pm)
Re: Attempted summary of suspend-blockers LKML thread, Arve Hjønnevåg, (Wed Aug 4, 3:08 pm)
Re: Attempted summary of suspend-blockers LKML thread, Arve Hjønnevåg, (Wed Aug 4, 3:51 pm)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Wed Aug 4, 4:06 pm)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Wed Aug 4, 4:10 pm)
Re: Attempted summary of suspend-blockers LKML thread, Anca Emanuel, (Wed Aug 4, 4:13 pm)
Re: Attempted summary of suspend-blockers LKML thread, Arve Hjønnevåg, (Wed Aug 4, 4:15 pm)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Wed Aug 4, 4:19 pm)
Re: Attempted summary of suspend-blockers LKML thread, Rafael J. Wysocki, (Wed Aug 4, 4:26 pm)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Wed Aug 4, 4:30 pm)
Re: Attempted summary of suspend-blockers LKML thread, Rafael J. Wysocki, (Wed Aug 4, 4:33 pm)
Re: Attempted summary of suspend-blockers LKML thread, Arve Hjønnevåg, (Wed Aug 4, 4:40 pm)
Re: Attempted summary of suspend-blockers LKML thread, Rafael J. Wysocki, (Wed Aug 4, 5:10 pm)
Re: Attempted summary of suspend-blockers LKML thread, Rafael J. Wysocki, (Wed Aug 4, 5:15 pm)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Wed Aug 4, 5:17 pm)
Re: Attempted summary of suspend-blockers LKML thread, Rafael J. Wysocki, (Wed Aug 4, 5:20 pm)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Wed Aug 4, 5:48 pm)
Re: Attempted summary of suspend-blockers LKML thread, Arve Hjønnevåg, (Wed Aug 4, 6:02 pm)
Re: Attempted summary of suspend-blockers LKML thread, Matt Helsley, (Wed Aug 4, 6:58 pm)
Re: Attempted summary of suspend-blockers LKML thread, Brian Swetland, (Wed Aug 4, 7:02 pm)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Wed Aug 4, 7:39 pm)
Re: Attempted summary of suspend-blockers LKML thread, Brian Swetland, (Wed Aug 4, 7:46 pm)
Re: Attempted summary of suspend-blockers LKML thread, Matt Helsley, (Wed Aug 4, 8:25 pm)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Wed Aug 4, 8:59 pm)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Wed Aug 4, 9:05 pm)
Re: Attempted summary of suspend-blockers LKML thread, Florian Mickler, (Wed Aug 4, 10:33 pm)
Re: Attempted summary of suspend-blockers LKML thread, Florian Mickler, (Wed Aug 4, 10:56 pm)
Re: Attempted summary of suspend-blockers LKML thread, Matthew Garrett, (Thu Aug 5, 6:38 am)
Re: Attempted summary of suspend-blockers LKML thread, Matthew Garrett, (Thu Aug 5, 6:40 am)
Re: Attempted summary of suspend-blockers LKML thread, Matthew Garrett, (Thu Aug 5, 6:47 am)
Re: Attempted summary of suspend-blockers LKML thread, Matthew Garrett, (Thu Aug 5, 7:16 am)
Re: Attempted summary of suspend-blockers LKML thread, Brian Swetland, (Thu Aug 5, 7:23 am)
Re: Attempted summary of suspend-blockers LKML thread, Brian Swetland, (Thu Aug 5, 7:29 am)
Re: Attempted summary of suspend-blockers LKML thread, Matthew Garrett, (Thu Aug 5, 7:33 am)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Thu Aug 5, 8:12 am)
Re: Attempted summary of suspend-blockers LKML thread, Brian Swetland, (Thu Aug 5, 8:15 am)
Re: Attempted summary of suspend-blockers LKML thread, Rafael J. Wysocki, (Thu Aug 5, 8:34 am)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Thu Aug 5, 11:09 am)
Re: Attempted summary of suspend-blockers LKML thread, kevin granade, (Thu Aug 5, 11:13 am)
Re: Attempted summary of suspend-blockers LKML thread, Brian Swetland, (Thu Aug 5, 11:20 am)
Re: [linux-pm] Attempted summary of suspend-blockers LKML ..., Paul E. McKenney, (Thu Aug 5, 11:21 am)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Thu Aug 5, 1:31 pm)
Re: Attempted summary of suspend-blockers LKML thread, kevin granade, (Thu Aug 5, 1:51 pm)
Re: Attempted summary of suspend-blockers LKML thread, Arve Hjønnevåg, (Thu Aug 5, 3:02 pm)
Re: Attempted summary of suspend-blockers LKML thread, Brian Swetland, (Thu Aug 5, 3:16 pm)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Thu Aug 5, 4:03 pm)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Thu Aug 5, 4:05 pm)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Thu Aug 5, 4:19 pm)
Re: Attempted summary of suspend-blockers LKML thread, Rafael J. Wysocki, (Thu Aug 5, 4:41 pm)
Re: Attempted summary of suspend-blockers LKML thread, Brian Swetland, (Thu Aug 5, 5:13 pm)
Re: Attempted summary of suspend-blockers LKML thread, Brian Swetland, (Thu Aug 5, 5:22 pm)
Re: Attempted summary of suspend-blockers LKML thread, Brian Swetland, (Thu Aug 5, 5:29 pm)
Re: Attempted summary of suspend-blockers LKML thread, Rafael J. Wysocki, (Thu Aug 5, 5:42 pm)
Re: Attempted summary of suspend-blockers LKML thread, Brian Swetland, (Thu Aug 5, 6:22 pm)
Re: Attempted summary of suspend-blockers LKML thread, Arve Hjønnevåg, (Thu Aug 5, 6:29 pm)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Fri Aug 6, 9:00 am)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Fri Aug 6, 10:09 am)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Fri Aug 6, 10:22 am)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Fri Aug 6, 10:24 am)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Fri Aug 6, 11:18 am)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Fri Aug 6, 5:36 pm)
Re: Attempted summary of suspend-blockers LKML thread, Rafael J. Wysocki, (Sat Aug 7, 2:01 am)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Sat Aug 7, 7:36 am)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Sat Aug 7, 8:07 am)
Re: Attempted summary of suspend-blockers LKML thread, Paul E. McKenney, (Sat Aug 7, 2:11 pm)
Re: Attempted summary of suspend-blockers LKML thread, Felipe Contreras, (Sun Aug 8, 6:35 am)
Re: Attempted summary of suspend-blockers LKML thread, Matthew Garrett, (Sun Aug 8, 9:08 am)
Re: Attempted summary of suspend-blockers LKML thread, Felipe Contreras, (Sun Aug 8, 10:08 am)
Re: Attempted summary of suspend-blockers LKML thread, Matthew Garrett, (Sun Aug 8, 10:09 am)
Re: Attempted summary of suspend-blockers LKML thread, tak ..., Felipe Contreras, (Wed Aug 11, 12:18 pm)
Re: Attempted summary of suspend-blockers LKML thread, tak ..., Felipe Contreras, (Wed Aug 11, 12:25 pm)
Re: Attempted summary of suspend-blockers LKML thread, Felipe Contreras, (Wed Aug 11, 5:23 pm)
Re: Attempted summary of suspend-blockers LKML thread, tak ..., Paul E. McKenney, (Thu Aug 12, 10:43 am)
Re: Attempted summary of suspend-blockers LKML thread, tak ..., Felipe Contreras, (Thu Aug 12, 10:52 am)
Re: Attempted summary of suspend-blockers LKML thread, tak ..., Paul E. McKenney, (Thu Aug 12, 11:38 am)
Re: Attempted summary of suspend-blockers LKML thread, tak ..., Felipe Contreras, (Thu Aug 12, 12:00 pm)
Re: [linux-pm] Attempted summary of suspend-blockers LKML ..., Dominik Brodowski, (Thu Aug 12, 12:27 pm)
Re: Attempted summary of suspend-blockers LKML thread, tak ..., Felipe Contreras, (Thu Aug 12, 12:34 pm)
Re: [linux-pm] Attempted summary of suspend-blockers LKML ..., Dominik Brodowski, (Thu Aug 12, 12:52 pm)
Re: [linux-pm] Attempted summary of suspend-blockers LKML ..., Felipe Contreras, (Fri Aug 13, 3:43 am)
Re: [linux-pm] Attempted summary of suspend-blockers LKML ..., Dominik Brodowski, (Fri Aug 13, 8:57 am)
Re: [linux-pm] Attempted summary of suspend-blockers LKML ..., Dominik Brodowski, (Fri Aug 13, 9:19 am)
Re: [linux-pm] Attempted summary of suspend-blockers LKML ..., Felipe Contreras, (Fri Aug 13, 9:19 am)
Re: [linux-pm] Attempted summary of suspend-blockers LKML ..., James Bottomley, (Fri Aug 13, 10:11 am)
Re: Attempted summary of suspend-blockers LKML thread, tak ..., Paul E. McKenney, (Fri Aug 13, 10:13 am)
Re: Attempted summary of suspend-blockers LKML thread, tak ..., Paul E. McKenney, (Sun Aug 15, 12:00 am)
Re: [linux-pm] Attempted summary of suspend-blockers LKML ..., Rafael J. Wysocki, (Mon Aug 16, 2:11 pm)