Mir

[regression] Mir server uses too much CPU during touch scrolling

Bug #1373809 reported by Daniel van Vugt
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Fix Released
High
Daniel van Vugt
0.7
Invalid
Undecided
Unassigned
mir (Ubuntu)
Invalid
Undecided
Unassigned
mir (Ubuntu RTM)
Fix Released
Undecided
Unassigned

Bug Description

[regression] Mir server uses too much CPU during touch events.

Until recently constant touch events never cause the CPU usage of my Mir server to exceed 50%. However with the latest code it's 80-90% CPU.

I'm fairly sure this is caused by my recent change:

------------------------------------------------------------
revno: 1936 [merge]
author: Daniel van Vugt <email address hidden>
committer: Tarmac
branch nick: development-branch
timestamp: Thu 2014-09-25 06:06:57 +0000
message:
  Fix jerky/stuttering event delivery that could happen inside
  nested servers sometimes (LP: #1372300)

  Waiting significantly longer than a frame before consuming previously
  batched events is too dangerous in slow raw-event environments
  (nested servers or very slow input devices). It causes frame skipping.
  . Fixes: https://bugs.launchpad.net/bugs/1372300.

  Approved by Alexandros Frantzis.
------------------------------------------------------------

Tags: regression

Related branches

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

This bug is invalid for 0.7 right now. Only exists in 0.8. Let's keep it that way.

summary: - [regression] Mir server uses too much CPU during touch events
+ [regression] Mir server uses too much CPU during touch scrolling
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 0.8.0

Changed in mir:
status: In Progress → Fix Committed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Invalid for Ubuntu. The bug was never released (it regressed and was fixed entirely in the 0.8 series before the 0.8.0 release).

Changed in mir (Ubuntu):
status: New → Invalid
Changed in mir:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (5.5 KiB)

This bug was fixed in the package mir - 0.8.0+14.10.20141010-0ubuntu1

---------------
mir (0.8.0+14.10.20141010-0ubuntu1) utopic; urgency=medium

  [ Daniel van Vugt ]
  * New upstream release 0.8.0 (https://launchpad.net/mir/+milestone/0.8.0)
    - Enhancements:
      . Less sensitivity to ABI breaks - many headers unused by external
        projects are now hidden and not installed by -dev packaes. If you
        require any headers that are missing, just ask.
      . Touchspots: --enable-touchspots to servers; visually shows touch
        locations (warning: This affects performance LP: #1373692).
      . Client performance reporting: Any Mir client can now get accurate
        performance information (frame rate, render time, buffer lag etc)
        logged to stdout. Just set env MIR_CLIENT_PERF_REPORT=log
      . Further improved touch responsiveness, with less lag and smoother
        scrolling (so long as you don't enable touchspots).
      . Slightly faster builds using precompiled headers.
      . Turn hardware overlays on by default. When in use, this halves the
        CPU usage of a Mir server. Already enabled in unity-system-compositor.
      . More scripting to detect ABI breaks.
      . Improved src/ tree consistency (renamed "src/shared" to "src/common").
      . Improved fatal signal design: Changed from SIGTERM to SIGHUP delivered
        to clients on unexpected server disconnection.
      . Improved library/package design to allow concurrent installations
        of different Mir versions without conflicts.
      . Fd reception code is now common to client and server.
    - ABI summary: Servers need rebuilding, but clients do not;
      . Mirclient ABI unchanged at 8
      . Mircommon ABI bumped to 2
      . Mirplatform ABI bumped to 3
      . Mirserver ABI bumped to 26
    - API changes between Mir 0.7 and 0.8:
      . Lots of headers removed from the public SDK! We have only hidden
        headers not known to be used by any known projects. Please let us
        know if anything is missing - https://bugs.launchpad.net/mir/+filebug
      . graphics::Platform - interface changed significantly.
      . Lots of server API changes to support touchspots.
      . File descriptors now passed as type Fd instead of int32_t.
    - Bug fixes:
      . [regression] Mir deb packages with versioned names cannot be installed
        simultaneously any more (LP: #1293944)
      . A frozen client can hang the whole server (LP: #1350207)
      . QtMir FTBFS: fatal error: mir/input/input_channel.h: No such file or
        directory (LP: #1365934)
      . [regression] platform-api fails to build against Mir 0.8 (LP: #1368354)
      . Mir FTBFS with gcc 4.9.1-14 (utopic update):
        auto_unblock_thread.h:44:46: error: no matching function for call to
        ‘std::thread::thread(<brace-enclosed initializer list>)’ (LP: #1369389)
      . [regression] Compositing is jerky and stutters during touch events
        (LP: #1372850)
      . unit test fails: AndroidInputReceiverSetup.slow_raw_input_doesnt_cause_
        frameskipping (LP: #1373826)
      . intermittent hang in TestClientInput (LP: #1338612)
      . TestClientInput.scene_obscure_mo...

Read more...

Changed in mir (Ubuntu):
status: Invalid → Fix Released
Changed in mir (Ubuntu):
status: Fix Released → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (11.9 KiB)

This bug was fixed in the package mir - 0.8.1+15.04.20150112.2~rtm-0ubuntu1

---------------
mir (0.8.1+15.04.20150112.2~rtm-0ubuntu1) 14.09; urgency=medium

  [ Daniel van Vugt ]
  * Bug fix release 0.8.1 (https://launchpad.net/mir/+milestone/0.8.1)
    - ABI summary: Servers need rebuilding, but clients do not;
      . Mirclient ABI unchanged at 8
      . Mircommon ABI unchanged at 2
      . Mirplatform ABI unchanged to 3
      . Mirserver ABI bumped to 26.1 (due to breakage in LP: #1355173)
    - Fixes bugs:
      . Switching windows with a Trusted Prompt Session active loses the
        trusted prompt session (LP: #1355173)
      . a prompt session with an invalid application pid should be an error
        (LP: #1377968)
  * mir_demo_client_basic: Don't assert on user errors like failing to
    connect to a Mir server. It's much more useful to tell the user what
    they did wrong than to automatically generate error reports and
    duplicate apport bugs. (LP: #1331958) . (LP: #1331958)
  * Enable "Project Butter" motion event resampling and prediction for a
    more responsive touch experience. .
  * When the server disconnects unexpectedly, give the client SIGHUP
    instead of the present SIGTERM. The former is more appropriate
    because it indicates: "Hangup detected on controlling terminal or
    death of controlling process" [signal(7)] whereas SIGTERM is
    reserved for more polite user-requested shutdowns. .
  * Fix the common/shared source tree layout inconsistency. If it goes
    in libmircommon then it should be called "common" and not "shared":
  * Move mir::time::*Clock out of libmirserver and into libmircommon. It
    will soon be used by libmirclient.
  * Bump version to 0.8.0 as Mir 0.7.0 was released today.
  * Remove dead code "kill_client_processes()" from mir_test_framework.
  * Work around spurious SIGKILL delivered to clients by Valgrind during
    tests. This is why CI is failing randomly (LP: #1364772) Actually
    this workaround is nothing new. A quick grep shows we already use
    the same hack in 13 other locations under tests/. . (LP: #1364772)
  * Privatise (don't install) headers that are unused by clients, QtMir
    or USC. This reduces the size of the public include/ tree from 377
    to 121 files, and reduces the number of those that get installed
    from 208 to 121.
  * Bump the mircommon ABI to 2. We actually broke it in the Mir 0.7.0
    release with symbols.map and didn't notice in time (LP: #1364890)
    (LP: #1364890)
  * Restore support for gcc-4.8/trusty (LP: #1366134) (LP: #1366134)
  * Publish an internal header that QtMir recently started using:
    mir/input/input_channel.h (LP: #1365934) . (LP: #1365934)
  * Relax dependencies on libmirplatform2. Any binary package that uses
    libmirplatform2 should already be ABI compatible with any version of
    libmirplatform2. Assuming we maintain our ABIs correctly...
    Minimising exact version requirements should minimise future package
    upgrade problems. .
  * Privatise more headers -- these are the ones unused by any external
    projects but are used internally by the server code in examples/
    only.
  * Introducing a generic client per...

Changed in mir (Ubuntu RTM):
status: New → Fix Released
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.