Re: [RFD] Automatic suspend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 20, 2009 at 3:20 PM, Oliver Neukum <oliver@xxxxxxxxxx> wrote:
> Am Samstag 21 Februar 2009 00:11:28 schrieb Arve Hjønnevåg:
>> On Fri, Feb 20, 2009 at 2:05 PM, Oliver Neukum <oliver@xxxxxxxxxx> wrote:
>> > Am Freitag 20 Februar 2009 11:46:55 schrieb Rafael J. Wysocki:
>> >> On Thursday 19 February 2009, Oliver Neukum wrote:
>
>> > With the set of runnable processes.There's always a window between
>> > evaluating the current set of runnable tasks and telling the kernel to
>> > sleep. IMO the most elegant solution would be a task attribute that would
>> > signal the kernel that a task should not count as keeping the system busy
>> > even if it is runnable and trigger the sleep in kernel space.
>>
>> It is not always safe to enter suspend when no tasks are runnable. For
>> instance, a key event could be on a user space queue, but the code
>> that reads from that queue has been paged out.
>
> In that case you'd have a task waiting for IO. The driver should refuse
> to suspend or wake up the system as IO is completed. It may be
> inefficient to suspend for such a presumably short time, but it is not
> a correctness issue.

In that case, yes. My point was that no-runnable-tasks is not a
sufficient indicator of whether suspend should fail or not. We have no
control of what a user space thread is waiting for though. It could be
waiting on a mutex that is locked by a thread that is marked not to
prevent suspend.


-- 
Arve Hjønnevåg
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm


[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux