idle phone; polling with 85-195 ms timeouts on poll, possible unneccessary wakeups

Bug #1377854 reported by Colin Ian King
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
unity8 (Ubuntu)
New
Low
Unassigned

Bug Description

While trying to figure out what's keeping the phone "busy" when idle (trying to save power), I noticed that unity8 is performing a lot of frequent poll() system calls with timeouts of 85-195 ms and it times out on these the majority of times. Wakeups keep a phone busy, so are these timeout polls() necessary?

On mako, with a idle phone in the period between inactivity before the screen blanks I observe:

root@ubuntu-phablet:~# strace -p $(pidof unity8) -e poll
Process 4195 attached
poll([{fd=3, events=POLLIN}, {fd=40, events=POLLIN}, {fd=41, events=POLLIN}, {fd=46, events=POLLIN}, {fd=61, events=POLLIN}, {fd=71, events=POLLIN}, {fd=72, events=POLLIN}], 7, 98) = 0 (Timeout)
poll([{fd=3, events=POLLIN}, {fd=40, events=POLLIN}, {fd=41, events=POLLIN}, {fd=46, events=POLLIN}, {fd=61, events=POLLIN}, {fd=71, events=POLLIN}, {fd=72, events=POLLIN}], 7, 199) = 0 (Timeout)
poll([{fd=3, events=POLLIN}, {fd=40, events=POLLIN}, {fd=41, events=POLLIN}, {fd=46, events=POLLIN}, {fd=61, events=POLLIN}, {fd=71, events=POLLIN}, {fd=72, events=POLLIN}], 7, 196) = 0 (Timeout)
poll([{fd=3, events=POLLIN}, {fd=40, events=POLLIN}, {fd=41, events=POLLIN}, {fd=46, events=POLLIN}, {fd=61, events=POLLIN}, {fd=71, events=POLLIN}, {fd=72, events=POLLIN}], 7, 195) = 0 (Timeout)
poll([{fd=3, events=POLLIN}, {fd=40, events=POLLIN}, {fd=41, events=POLLIN}, {fd=46, events=POLLIN}, {fd=61, events=POLLIN}, {fd=71, events=POLLIN}, {fd=72, events=POLLIN}], 7, 195) = 0 (Timeout)
poll([{fd=3, events=POLLIN}, {fd=40, events=POLLIN}, {fd=41, events=POLLIN}, {fd=46, events=POLLIN}, {fd=61, events=POLLIN}, {fd=71, events=POLLIN}, {fd=72, events=POLLIN}], 7, 94) = 0 (Timeout)
poll([{fd=3, events=POLLIN}, {fd=40, events=POLLIN}, {fd=41, events=POLLIN}, {fd=46, events=POLLIN}, {fd=61, events=POLLIN}, {fd=71, events=POLLIN}, {fd=72, events=POLLIN}], 7, 89) = 0 (Timeout)
poll([{fd=3, events=POLLIN}, {fd=40, events=POLLIN}, {fd=41, events=POLLIN}, {fd=46, events=POLLIN}, {fd=61, events=POLLIN}, {fd=71, events=POLLIN}, {fd=72, events=POLLIN}], 7, 195) = 0 (Timeout)
poll([{fd=3, events=POLLIN}, {fd=40, events=POLLIN}, {fd=41, events=POLLIN}, {fd=46, events=POLLIN}, {fd=61, events=POLLIN}, {fd=71, events=POLLIN}, {fd=72, events=POLLIN}], 7, 196) = 0 (Timeout)
poll([{fd=3, events=POLLIN}, {fd=40, events=POLLIN}, {fd=41, events=POLLIN}, {fd=46, events=POLLIN}, {fd=61, events=POLLIN}, {fd=71, events=POLLIN}, {fd=72, events=POLLIN}], 7, 188) = 0 (Timeout)

So one can see the poll() in these calls is ~90-195 ms, causing ~5-6 wakeups a second which are poll timeouts. Since no other system calls are being called, it looks like an inner loop re-polls again for another timeout to occur again. Perhaps the timeout is too low?

Avoiding excessive wakeups does save power. In this case, it's not much, but this is the largest cause of wakeups now on an idle phone.

Changed in unity8 (Ubuntu):
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.