2010/8/4 Rafael J. Wysocki <rjw@sisk.pl>:Which makes the driver and/or network stack changes identical to using wakelocks, right? Not having stats or not knowing what pm_relax is undoing? We need stats to be able to debug the system. If the system does not suspend at all or is awake for too long, the wakelock stats tells us which component is at fault. Since pm_stay_awake and pm_relax does not operate on a handle, you cannot determine how long it prevented suspend for. Only if the driver blocks suspend until user-space has read the event. This means that for android to work we need to block suspend when input events are not processed, but a system using your scheme needs a pm_wakeup_event call when the input event is queued. How to you switch between them? Do we add separate ioctls in the input device to enable each scheme? If someone has a single threaded user space power manager that also reads input event it will deadlock if you block suspend until it reads the input events since you block when reading the wake count. -- Arve Hjønnevåg --
