From: Pavel Machek <pavel@ucw.cz>
To: Arve Hj?nnev?g <arve@android.com>
Cc: James Kosin <james.kosin.04@cnu.edu>, linux-kernel@vger.kernel.org
Subject: Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api.
Date: Mon, 24 May 2010 20:57:35 +0200 [thread overview]
Message-ID: <20100524185735.GC1292@ucw.cz> (raw)
In-Reply-To: <g2rd6200be21005062010s1a490b3dref465f5df64b8f7@mail.gmail.com>
Hi!
> >>> Tony,
> >>> Wouldn't this be handled by the idle task, or task manager?
> >>>
> >>> When all tasks are suspended and not doing anything that should be the
> >>> first clue that a real suspend cycle could be attempted.
> >>>
> >>>
> >> One if the benefit we get from using suspend is that an unprivileged
> >> app that does not have access to suspend blockers cannot prevent
> >> suspend. You lose this advantage if you trigger suspend only from the
> >> idle task.
> >>
> >>
> > If the process (privileged or unprivileged) doesn't want to suspend, why
> > not just provide an interface to allow suspend to be turned off at the
> > user level. This could block the suspend cycle in itself, and you
> > shouldn't need fine grained off/on cycles. If an application really
> > needs the system not to suspend then they (the user) should know the
> > consequences and power requirements for such a task.
> >
> > I didn't say it had to be only from the idle task; but, that is the most
> > logical place. If the other threads are not idle then they really
> > require work and will most likely already have a bock on the suspend anyway.
> I think you missed my point. Unprivileged processes should not be
> allowed to prevent suspend.
Currently, we do not suspend automatically, and not suspending when
*anything* is running is clearly backwards compatible....
If suspend is disallowed, application doing while(1); will consume
more power than the one doing sleep(1) so.... I'm not sure how much
sense such "security policy" makes.
Anyway, for android use case, maybe you could have something like
ksuspendd, and adjust its priority? That way, you could have tasks
below the priority of ksuspendd, and those would not block suspend.
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2010-05-24 18:57 UTC|newest]
Thread overview: 84+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <eGToe-3b9-5@gated-at.bofh.it>
[not found] ` <eGUaB-4mU-1@gated-at.bofh.it>
[not found] ` <eGUtX-4Kd-3@gated-at.bofh.it>
[not found] ` <eGWvL-7Fy-1@gated-at.bofh.it>
[not found] ` <eGWFt-7S7-17@gated-at.bofh.it>
[not found] ` <eGWP9-8jH-17@gated-at.bofh.it>
2010-05-07 2:41 ` [linux-pm] [PATCH 1/8] PM: Add suspend block api James Kosin
2010-05-07 2:53 ` Arve Hjønnevåg
2010-05-07 3:01 ` James Kosin
2010-05-07 3:10 ` Arve Hjønnevåg
2010-05-07 3:19 ` James Kosin
2010-05-07 16:25 ` Tony Lindgren
2010-05-24 18:57 ` Pavel Machek
2010-05-24 18:57 ` Pavel Machek [this message]
2010-05-07 16:10 ` Tony Lindgren
2010-04-30 22:36 [PATCH 0/8] Suspend block api (version 6) Arve Hjønnevåg
2010-04-30 22:36 ` [PATCH 1/8] PM: Add suspend block api Arve Hjønnevåg
2010-05-04 5:12 ` [linux-pm] " mark gross
2010-05-04 13:59 ` Alan Stern
2010-05-04 16:03 ` mark gross
2010-05-04 17:16 ` Alan Stern
2010-05-05 1:50 ` mark gross
2010-05-05 13:31 ` Matthew Garrett
2010-05-05 20:09 ` mark gross
2010-05-05 20:21 ` Matthew Garrett
2010-05-05 15:44 ` Alan Stern
2010-05-05 20:28 ` mark gross
2010-05-05 21:12 ` Alan Stern
2010-05-05 21:37 ` Brian Swetland
2010-05-05 23:47 ` Tony Lindgren
2010-05-05 23:56 ` Brian Swetland
2010-05-06 0:05 ` Tony Lindgren
2010-05-06 4:16 ` Arve Hjønnevåg
2010-05-06 17:04 ` Tony Lindgren
2010-05-07 0:10 ` Arve Hjønnevåg
2010-05-07 15:54 ` Tony Lindgren
2010-05-28 6:43 ` Pavel Machek
2010-05-28 7:01 ` Arve Hjønnevåg
2010-05-06 13:40 ` Matthew Garrett
2010-05-06 17:01 ` Tony Lindgren
2010-05-06 17:09 ` Matthew Garrett
2010-05-06 17:14 ` Tony Lindgren
2010-05-06 17:22 ` Matthew Garrett
2010-05-06 17:38 ` Tony Lindgren
2010-05-06 17:43 ` Matthew Garrett
2010-05-06 18:33 ` Tony Lindgren
2010-05-06 18:44 ` Matthew Garrett
2010-05-07 2:05 ` Tony Lindgren
2010-05-07 17:12 ` Matthew Garrett
2010-05-07 17:35 ` Tony Lindgren
2010-05-07 17:50 ` Matthew Garrett
2010-05-07 18:01 ` Tony Lindgren
2010-05-07 18:28 ` Matthew Garrett
2010-05-07 18:43 ` Tony Lindgren
2010-05-07 18:46 ` Matthew Garrett
2010-05-07 19:06 ` Daniel Walker
2010-05-07 19:28 ` Tony Lindgren
2010-05-07 19:33 ` Matthew Garrett
2010-05-07 19:55 ` Tony Lindgren
2010-05-07 20:28 ` Matthew Garrett
2010-05-07 20:53 ` Tony Lindgren
2010-05-07 21:03 ` Matthew Garrett
2010-05-07 21:25 ` Tony Lindgren
2010-05-07 21:32 ` Arve Hjønnevåg
2010-05-07 21:39 ` Matthew Garrett
2010-05-07 21:42 ` Tony Lindgren
2010-05-07 21:48 ` Matthew Garrett
2010-05-07 22:00 ` Tony Lindgren
2010-05-07 22:28 ` Matthew Garrett
2010-05-07 21:30 ` Daniel Walker
2010-05-07 21:35 ` Arve Hjønnevåg
2010-05-07 21:43 ` Daniel Walker
2010-05-07 21:38 ` Matthew Garrett
2010-05-06 18:47 ` Alan Stern
2010-05-07 2:20 ` Tony Lindgren
2010-05-28 13:29 ` Pavel Machek
2010-05-28 13:42 ` Brian Swetland
2010-05-06 17:35 ` Daniel Walker
2010-05-06 18:36 ` Tony Lindgren
2010-05-06 19:11 ` Daniel Walker
2010-05-07 2:00 ` Tony Lindgren
2010-05-07 17:20 ` Daniel Walker
2010-05-07 17:36 ` Matthew Garrett
2010-05-07 17:40 ` Daniel Walker
2010-05-07 17:51 ` Matthew Garrett
2010-05-07 18:00 ` Daniel Walker
2010-05-07 18:17 ` Tony Lindgren
2010-05-07 17:50 ` Tony Lindgren
2010-05-07 3:45 ` mgross
2010-05-07 3:45 ` mgross
2010-05-07 4:10 ` Arve Hjønnevåg
2010-05-04 20:40 ` Arve Hjønnevåg
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=20100524185735.GC1292@ucw.cz \
--to=pavel@ucw.cz \
--cc=arve@android.com \
--cc=james.kosin.04@cnu.edu \
--cc=linux-kernel@vger.kernel.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).