[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d6200be20902181435o1794007bpfbab1f9e41979bad@mail.gmail.com>
Date: Wed, 18 Feb 2009 14:35:26 -0800
From: Arve Hjønnevåg <arve@...roid.com>
To: "Rafael J. Wysocki" <rjw@...k.pl>
Cc: Alan Stern <stern@...land.harvard.edu>,
"Woodruff, Richard" <r-woodruff2@...com>,
Arjan van de Ven <arjan@...radead.org>,
Kyle Moffett <kyle@...fetthome.net>,
Oliver Neukum <oliver@...kum.org>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
pm list <linux-pm@...ts.linux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>, Pavel Machek <pavel@....cz>,
Nigel Cunningham <nigel@...el.suspend2.net>,
Matthew Garrett <mjg59@...f.ucam.org>,
mark gross <mgross@...ux.intel.com>,
Uli Luckas <u.luckas@...d.de>,
Igor Stoppa <igor.stoppa@...ia.com>,
Brian Swetland <swetland@...gle.com>,
Len Brown <lenb@...nel.org>
Subject: Re: [RFD] Automatic suspend
On Wed, Feb 18, 2009 at 1:17 PM, Rafael J. Wysocki <rjw@...k.pl> wrote:
> On Wednesday 18 February 2009, Arve Hjønnevåg wrote:
>> On Tue, Feb 17, 2009 at 3:21 PM, Rafael J. Wysocki <rjw@...k.pl> wrote:
>> > On Tuesday 17 February 2009, Alan Stern wrote:
>> >> Kernel wakelocks are a separate matter. They are more like a form of
>> >> optimization, preventing the kernel from starting an auto-suspend when
>> >> some driver knows beforehand that it will return -EBUSY.
>> >
>> > I think kernel-side autosuspend (or rather autosleep) should only happen
>> > after certain subset of devices have been suspended using a per-device
>> > run-time autosuspend mechanism.
>>
>> When the last wakelock is released the task that we woke up to perform
>> has finished. Why wait to re-enter suspend.
>
> I don't really understand this comment. Could you please explain a bit?
If some devices are autosuspended after a local inactivity timeout, I
don't want to wait for those devices to autosuspend if I know the code
that needed to run is done. This could cause delays in the normal
case, and it could prevent suspend if a background process (not using
wakelocks) is accessing a disk more frequently than its idle timeout.
>
>> >> > Phase 3: Probably explicit control left to open/close.
>> >>
>> >> While that's generally a good idea, it's important to recognize that
>> >> some devices should be runtime-suspended even while they are open.
>> >
>> > From the kernel side, yes (and that should be transparent to the user space
>> > having them open). By the user space, no.
>>
>> Allowing user space to suspend input devices while they are still open
>> is useful. The user-space code that reads from the input devices does
>> not need to know if the device is suspended or not, and the kernel
>> cannot auto suspend input devices based on inactivity.
>
> Hmm. Why can't it?
Because they stop working. It is OK for us to turn off the touchscreen
when the screen is off, but when the screen is on the user will touch
items on the screen and expect them to respond. (We could also turn
off the touchscreen when the keyguard is on, but we don't currently do
this.)
--
Arve Hjønnevåg
--
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