[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1008050622590.25170@asgard.lang.hm>
Date: Thu, 5 Aug 2010 06:28:00 -0700 (PDT)
From: david@...g.hm
To: "Rafael J. Wysocki" <rjw@...k.pl>
cc: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Arve Hjønnevåg <arve@...roid.com>,
Matthew Garrett <mjg59@...f.ucam.org>,
Arjan van de Ven <arjan@...radead.org>,
linux-pm@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
pavel@....cz, florian@...kler.org, stern@...land.harvard.edu,
swetland@...gle.com, peterz@...radead.org, tglx@...utronix.de,
alan@...rguk.ukuu.org.uk
Subject: Re: Attempted summary of suspend-blockers LKML thread
On Thu, 5 Aug 2010, Rafael J. Wysocki wrote:
> On Thursday, August 05, 2010, david@...g.hm wrote:
>> On Thu, 5 Aug 2010, Rafael J. Wysocki wrote:
>>
>>> On Thursday, August 05, 2010, david@...g.hm wrote:
>>>>
>>>> My proposal would never freeze a subset of processes.
>>>>
>>>> what my proposal:
>>>>
>>>> only consider the activity of a subset of processes when deciding if we
>>>> should suspend or not. If the decision is to suspend, freeze everything.
>>>
>>> That alone doesn't allow you to handle the race Matthew was referring to
>>> (ie. wakeup event happening right after you've decided to suspend).
>>>
>>> A mechanism of making a decision alone is not sufficient, you also need a
>>> mechanism to avoid races between wakeup events and suspend process.
>>>
>>
>> I thought you just posted that there was a new feature that would be able
>> to abort the suspend and so that race was closed.
>
> Yes, you can use that for this purpose, but then you'd need a user space
> power manager who would decide whether or not to suspend. Then, however,
> the problem boils down to setting up appropriate communication between the
> power manager and the other applications in user space (ie. the kernel
> doesn't need to be involved in that at all).
This race sounds like it's generic across all platforms and not an Android
specific problem. Android is just more sensitive to it as they do a
suspend more frequently.
one thought on this, as a generic solution to the problem would it be
possible for the suspend controller (whatever it is) to do the
following
1. decide to suspend
2. setup monitors for the wake events
3. double check if it still wants to suspend
this way you don't pay the overhead of the wake monitors while you are
running normally, but if one hits while you are suspending you wake up
again as quickly as you can (which could involve aborting the suspend and
backing out, or going fully into suspend and waking up immediatly,
depending on which is better/easier at the time you get the wakeup)
David Lang
--
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