Mir is always in a busy wait, always using CPU
Bug #1108725 reported by
Daniel van Vugt
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mir |
Fix Released
|
High
|
Alexandros Frantzis | ||
The Ubuntu Power Consumption Project |
Fix Released
|
Undecided
|
Alexandros Frantzis |
Bug Description
Mir is always in a busy wait, always using CPU.
The rendering loop in mir is currently only throttled by vsync. So on my i7, at idle it still uses 2.7% CPU. If mir can't get the display however (like when it's started in VT screensaver mode or VT is switched) then mir is stuck at 100% CPU. Because it no longer has even vsync to slow it down.
A critical requirement for any non-game renderer is the ability to idle completely, and only redraw the screen when something changes. This is typically an event originating in an application.
Related branches
lp:~afrantzis/mir/composite-on-demand
- PS Jenkins bot (community): Approve (continuous-integration)
- Daniel van Vugt: Abstain
- Kevin DuBois (community): Approve
- Alan Griffiths: Approve
-
Diff: 1186 lines (+456/-88)19 files modifiedexamples/render_surfaces.cpp (+3/-3)
include/server/mir/compositor/default_compositing_strategy.h (+3/-3)
include/server/mir/compositor/multi_threaded_compositor.h (+3/-0)
include/server/mir/compositor/renderables.h (+19/-9)
include/server/mir/compositor/rendering_operator.h (+1/-1)
include/server/mir/default_server_configuration.h (+2/-2)
include/server/mir/surfaces/surface.h (+3/-1)
include/server/mir/surfaces/surface_stack.h (+9/-3)
include/test/mir_test_doubles/stub_surface_builder.h (+1/-1)
src/server/compositor/default_compositing_strategy.cpp (+4/-4)
src/server/compositor/multi_threaded_compositor.cpp (+58/-5)
src/server/default_server_configuration.cpp (+4/-3)
src/server/surfaces/surface.cpp (+10/-2)
src/server/surfaces/surface_stack.cpp (+35/-11)
tests/unit-tests/compositor/test_default_compositing_strategy.cpp (+15/-12)
tests/unit-tests/compositor/test_multi_threaded_compositor.cpp (+152/-8)
tests/unit-tests/shell/test_surface.cpp (+1/-1)
tests/unit-tests/surfaces/test_surface.cpp (+77/-18)
tests/unit-tests/surfaces/test_surface_stack.cpp (+56/-1)
Changed in mir: | |
importance: | Critical → High |
information type: | Proprietary → Public |
Changed in ubuntu-power-consumption: | |
assignee: | nobody → Alexandros Frantzis (afrantzis) |
status: | New → Confirmed |
Changed in ubuntu-power-consumption: | |
status: | Confirmed → In Progress |
Changed in mir: | |
milestone: | none → 0.0.3 |
Changed in mir: | |
status: | Fix Committed → Fix Released |
Changed in ubuntu-power-consumption: | |
status: | In Progress → Fix Released |
To post a comment you must log in.
This sounds like an important use case: How can we automate a test?