[Bug 1227000] Re: update-notifier is polling every 5 seconds

Colin King 1227000 at bugs.launchpad.net
Mon Mar 31 21:26:11 UTC 2014


** Changed in: ubuntu-power-consumption
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to update-notifier in Ubuntu.
https://bugs.launchpad.net/bugs/1227000

Title:
  update-notifier is polling every 5 seconds

Status in The Ubuntu Power Consumption Project:
  Fix Released
Status in “update-notifier” package in Ubuntu:
  Fix Released

Bug description:
  In order to reduce system wakeups to improve laptop battery life I've
  noticed that update-notifier is polling every 5 seconds, strace'ing
  the process shows:

  recvfrom(6, 0x8b16e4, 4096, 0, 0, 0)    = -1 EAGAIN (Resource temporarily unavailable)
  poll([{fd=5, events=POLLIN}, {fd=6, events=POLLIN}, {fd=3, events=POLLIN}], 3, 4373) = 0 (Timeout)
  recvfrom(6, 0x8b16e4, 4096, 0, 0, 0)    = -1 EAGAIN (Resource temporarily unavailable)
  poll([{fd=5, events=POLLIN}, {fd=6, events=POLLIN}, {fd=3, events=POLLIN}], 3, 4995) = 0 (Timeout)
  recvfrom(6, 0x8b16e4, 4096, 0, 0, 0)    = -1 EAGAIN (Resource temporarily unavailable)
  poll([{fd=5, events=POLLIN}, {fd=6, events=POLLIN}, {fd=3, events=POLLIN}], 3, 4994) = 0 (Timeout)
  recvfrom(6, 0x8b16e4, 4096, 0, 0, 0)    = -1 EAGAIN (Resource temporarily unavailable)
  poll([{fd=5, events=POLLIN}, {fd=6, events=POLLIN}, {fd=3, events=POLLIN}], 3, 4999) = 0 (Timeout)
  recvfrom(6, 0x8b16e4, 4096, 0, 0, 0)    = -1 EAGAIN (Resource temporarily unavailable)
  poll([{fd=5, events=POLLIN}, {fd=6, events=POLLIN}, {fd=3, events=POLLIN}], 3, 4995) = 0 (Timeout)
  recvfrom(6, 0x8b16e4, 4096, 0, 0, 0)    = -1 EAGAIN (Resource temporarily unavailable)

  It appears that file_monitor_periodic_check() is being called every 5
  seconds and it checks to see if variables such as un->crashreport is
  NULL or un->dpkg_was_run is true.

  From a casual look at the code, these are set by monitor_cb() which is
  called when files are modified, so does this make the 5 second poll
  unnecessary?    Can we remove the 5 second polling and just do the
  file_monitor_periodic_checks when monitor_cb detects something to act
  upon?

  As it stands, polling every 5 seconds unnecessarily keeps the CPU out
  of deep sleep C states and consumes a small amount of power.  This is
  a  low priority issue, but it would be a nice to have fix to make the
  code a little more power optimal.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-power-consumption/+bug/1227000/+subscriptions



More information about the foundations-bugs mailing list