sleep() call causing unnecessary wake ups
Bug #1002811 reported by
Harald Sitter
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
xsettings-kde (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Precise |
Fix Released
|
Undecided
|
Michał Zając |
Bug Description
In the xevent processing thread there is a conditional sleep() call when the event queue is empty. This is unnecessary as the used XNextEvent function blocks on an empty queue. The sleep call thus causes an unnecessary wake up every 2 seconds preventing CPU sleep and consuming CPU time for no good reason.
This is easily resolved by removing the bogus loop.
[Test Case]
Reproduce:
* make sure xsettings-kde is running
* use sudo powertop
* observe that xsettings-kde is having 0.5 events/second (one event every 2 seconds) and causes CPU usage of (on my system) 14us
Fixed:
* in powertop xsettings-kde does not have any events most of the time, using no CPU (or it is not showing up at all)
Related branches
description: | updated |
Changed in xsettings-kde (Ubuntu Precise): | |
assignee: | nobody → Michał Zając (quintasan) |
To post a comment you must log in.
Fixed for quantal in 0.12.3-0ubuntu3