Mir

Merge lp://qastaging/~alan-griffiths/mir/fix-1532202 into lp://qastaging/mir

Proposed by Alan Griffiths
Status: Merged
Approved by: Alan Griffiths
Approved revision: no longer in the source branch.
Merged at revision: 3274
Proposed branch: lp://qastaging/~alan-griffiths/mir/fix-1532202
Merge into: lp://qastaging/mir
Diff against target: 224 lines (+99/-9)
5 files modified
src/include/server/mir/scene/legacy_scene_change_notification.h (+8/-1)
src/server/compositor/multi_threaded_compositor.cpp (+26/-2)
src/server/compositor/multi_threaded_compositor.h (+2/-0)
src/server/scene/legacy_scene_change_notification.cpp (+62/-5)
tests/integration-tests/test_surface_stack_with_compositor.cpp (+1/-1)
To merge this branch: bzr merge lp://qastaging/~alan-griffiths/mir/fix-1532202
Reviewer Review Type Date Requested Status
Gerry Boland (community) Approve
Kevin DuBois (community) Approve
Brandon Schaefer (community) Approve
Alexandros Frantzis (community) Approve
Daniel van Vugt Abstain
PS Jenkins bot (community) continuous-integration Approve
Mir CI Bot continuous-integration Approve
Review via email: mp+283190@code.qastaging.launchpad.net

Commit message

compositor, scene: track which outputs are "damaged" by buffer posts

Description of the change

compositor, scene: track which outputs are "damaged" by buffer posts

This addresses the scenario in the linked bug, but there are still issues when using the AdorningDisplayBufferCompositor from the examples and opportunities to optimize the display updates in the (android) system compositor.

To post a comment you must log in.
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:3251
https://mir-jenkins.ubuntu.com/job/mir-ci/87/
Executed test runs:
    None: https://mir-jenkins.ubuntu.com/job/generic-update-mp/87/console

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/87/rebuild

review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:3251
http://jenkins.qa.ubuntu.com/job/mir-ci/6059/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-android-vivid-i386-build/5590
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-clang-vivid-amd64-build/4497
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-vivid-touch/5546
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-xenial-touch/300
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-xenial-amd64-ci/383
        deb: http://jenkins.qa.ubuntu.com/job/mir-xenial-amd64-ci/383/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-xenial-i386-ci/383
        deb: http://jenkins.qa.ubuntu.com/job/mir-xenial-i386-ci/383/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-builder-vivid-armhf/5543
        deb: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-builder-vivid-armhf/5543/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-runner-touch/8002
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26789
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-builder-xenial-armhf/296
        deb: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-builder-xenial-armhf/296/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mir-mediumtests-runner-xenial-touch/152
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/26801

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/mir-ci/6059/rebuild

review: Approve (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Sounds like a handy optimization to have. Although I can't help but think we're missing the main issue. The main issue is probably related to the fact that you mentioned the system was mostly idle while we were failing to meet frame deadlines. So it's not necessarily a hard performance limit we hit as much as inefficient blocking/waiting somewhere.

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> Sounds like a handy optimization to have. Although I can't help but think
> we're missing the main issue. The main issue is probably related to the fact
> that you mentioned the system was mostly idle while we were failing to meet
> frame deadlines. So it's not necessarily a hard performance limit we hit as
> much as inefficient blocking/waiting somewhere.

Yes, there's an iceberg of issues here. We should return to these and I've logged lp:1535894 to cover that.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Wasn't the issue Unity8? I recall QtMir is full of TODOs for multimonitor support, particularly around correct usage of compositor acquire IDs.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Aside from the above comment, my reason for not liking regional damage is based on previous experience in Compiz and even in mir_proving_server. Accurately tracking damage when you might be painting things using free-form OpenGL (not bound by any surface extents) like shadows is just too much of a pain to maintain. And on low-end systems can become a CPU bottleneck.

Put another way, given two monitors A and B, your window may only exist on A, but you really have to redraw both A and B in case shadows or some other side-effect creeps across.

review: Abstain
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Yes, QtMir and Unity8 also have work to do. But this issue was explicitly about Mir - and we ought to get this working as well as HWC allows.

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

Looks good.

No tests?

review: Approve
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Another bigger concern is that this branch seems like a crutch. It lets us only just maintain a good frame rate so long as we only need to redraw one monitor. It is however an admission that we're not capable of redrawing multiple monitors per frame, which sounds like a problem that still needs fixing.

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Not doing unnecessary rendering isn't "a crutch", especially on a battery powered device.

I don't consider our frame rate problems at an end, but I think this is an increment in the right direction.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It is a crutch if you've established the system is mostly idle and therefore we're not trying very hard to render sufficiently fast. We've had and still do have other such performance problems where it's a matter of real-time getting wasted in blocking system calls, but no CPU or GPU time getting wasted. Bug 1395421 comes to mind.

Adding a little complexity like this to improve performance seems harmless but is almost certainly missing the main issue.

Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

lgtm

Not 100% sure what:
run_cv.notify_one();

Is actually *running* but does it block on this thread? (Since we block at the top of that function).

review: Approve
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> lgtm
>
> Not 100% sure what:
> run_cv.notify_one();
>
> Is actually *running* but does it block on this thread? (Since we block at the
> top of that function).

It is an implementation detail of compositor logic: the "run()" function blocks on run_cv awaiting a notification that there's work to do.

Revision history for this message
Kevin DuBois (kdub) wrote :

lgtm too, apart from having some MultiThreadedCompositor tests

review: Approve
Revision history for this message
Gerry Boland (gerboland) wrote :

Late test, but improves MM performance on N7

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches