linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: James Kosin <james.kosin.04@cnu.edu>
Cc: "Arve Hjønnevåg" <arve@android.com>, linux-kernel@vger.kernel.org
Subject: Re: [linux-pm] [PATCH 1/8] PM: Add suspend block api.
Date: Fri, 7 May 2010 09:25:44 -0700	[thread overview]
Message-ID: <20100507162544.GE387@atomide.com> (raw)
In-Reply-To: <4BE386D1.2050608@cnu.edu>

* James Kosin <james.kosin.04@cnu.edu> [100506 20:14]:
> On 5/6/2010 11:10 PM, Arve Hjønnevåg wrote:
> >>>>         
> >>> 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.

This assumes that you're using cached values for echo mem > /sys/power/state
and the system keeps on running.

IMHO if you want to keep the system running, then you should just use
cpuidle and implement good idle modes.

Then when someting in the userspace knows you've been idle long enough,
you can suspend.

> >> 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.

You could just freeze the GUI process based on some policy if you
worry about misbehaving timers in various apps. This way the cpuidle
modes will allow you to run some userspace policy daemon. And then that
can suspend if needed based on how it's configured.
  
> Ah, you want a way for the system to suspend (and enforce the suspend)
> when only unprivileged processes are the only thing running....
> 
> That would mean a lot of work defining the unprivileged (or privileged)
> processes, and properly suspending (or enforcing) when needed.  Yuck. 
> Sorry I commented then, this is really getting deep into what I love to
> do at work.

Hmm, yeah sounds a bit messy.

Tony

  reply	other threads:[~2010-05-07 16:25 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 [this message]
2010-05-24 18:57                   ` Pavel Machek
2010-05-24 18:57                   ` Pavel Machek
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=20100507162544.GE387@atomide.com \
    --to=tony@atomide.com \
    --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).