process wakeups
Harald Hoyer
harald at redhat.com
Tue Jul 15 11:30:50 UTC 2008
Matthew Garrett wrote:
> On Mon, Jul 14, 2008 at 02:57:56PM -0700, Ulrich Drepper wrote:
>
>> I would hope the package maintainers can find some time and look at the
>> issues. Maybe at least document them in a BZ. I might try to do the
>> latter myself but given the large number of packages involved I'll most
>> likely be able to cover just a few packages. IMO it should be a release
>> criteria that a program does use polling.
>
> There are certain situations where polling is inevitable (such as
> querying hardware for battery status or signal strength, pulling mail,
> that kind of thing). Applications that do this should do it at
> relatively low frequency, and where possible (ie, almost always) use
> g_timeout_add_seconds or equivalent functionality. It's pretty
> inevitable that we'll have one wakeup a second, and ensuring that all
> applications that need to be woken during that second are woken at the
> same time has a significant benefit on power consumption.
>
g_timeout_add_seconds does not "really" sync globally.
The kernel could schedule a common (across all apps) wakeup time a little bit
better than g_timeout_add_seconds(), if the application could specify a time
"range" of how long it would like to approx. sleep. Also g_timeout_add_seconds()
does not work with select/poll.
More information about the fedora-devel-list
mailing list