[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1274971317.27810.5070.camel@twins>
Date: Thu, 27 May 2010 16:41:57 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Matthew Garrett <mjg59@...f.ucam.org>
Cc: Alan Cox <alan@...rguk.ukuu.org.uk>,
Arve Hjønnevåg <arve@...roid.com>,
Florian Mickler <florian@...kler.org>,
Vitaly Wool <vitalywool@...il.com>,
LKML <linux-kernel@...r.kernel.org>, felipe.balbi@...ia.com,
Linux OMAP Mailing List <linux-omap@...r.kernel.org>,
Linux PM <linux-pm@...ts.linux-foundation.org>
Subject: Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8)
On Thu, 2010-05-27 at 15:35 +0100, Matthew Garrett wrote:
> On Thu, May 27, 2010 at 04:28:51PM +0200, Peter Zijlstra wrote:
> > On Thu, 2010-05-27 at 15:06 +0100, Matthew Garrett wrote:
> > > one way which indicates to the scheduler that tasks in TASK_RUNNING
> > > should be scheduled, and when the session is idle we set the flag the
> > > other way and all processes in that cgroup get shifted to
> > > TASK_INTERRUPTIBLE or something.
> >
> > What's wrong with simply making the phone beep loudly and displaying:
> > bouncing cows is preventing your phone from sleeping!
>
> Well, primarily that it's possible to design an implementation where it
> *doesn't* prevent your phone froms sleeping, but also because a given
> application may justifiably be preventing your phone from sleeping for a
> short while. What threshold do you use to determine the difference?
Whatever you want, why would the kernel care?
You can create a whole resource management layer in userspace, with
different privilidge/trust levels. Trusted apps may wake more than
untrusted apps. Who cares.
The thing is, you can easily detect what keeps your cpu from idling.
What you do about it a pure userspace solution.
You can use the QoS stuff to give hints, like don't wake me more than 5
times a minute, if with those hints an app still doesn't meet whatever
criteria are suitable for the current mode, yell at it. Or adjust its
QoS parameters for it.
Heck, for all I care, simply SIGKILL the thing and report it once the
user starts looking at his screen again.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists