New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 845659 link

Starred by 5 users

Issue metadata

Status: Started
Owner:
Last visit > 30 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Scheduling and buffer release logic is non-optimal in sommelier

Project Member Reported by reve...@chromium.org, May 22 2018

Issue description

Presentation timing protocol should be exposed to crostini clients so they can be smarter about scheduling. Sommelier can also use this to implement smarter frame callbacks and buffer release logic.

We're too aggressive about releasing buffers today. It's causing dropped frames as allocating a large buffer is expensive.

For now, it's probably best to remove the aggressive buffer release logic and just allow the buffer queue to grow as large as needed. We can make that smarter as part of implementing support for the presentation feedback protocol.
 
Project Member

Comment 1 by bugdroid1@chromium.org, May 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/c1b9265f7504faf56a121b4b7a4d78110e64ee01

commit c1b9265f7504faf56a121b4b7a4d78110e64ee01
Author: David Reveman <reveman@chromium.org>
Date: Wed May 23 04:57:02 2018

vm_tools: sommelier: remove bad buffer release logic

Let the surface buffer queue grow as needed for now. The result is
that we're not dropping frames from random allocations during
continuous rendering.

Follow-up scheduling improvements will allow us to be smart about
releasing buffers that are not used without causing jank.

BUG=chromium:845659
TEST=less dropped frames with dmabufs enabled

Change-Id: If3feb8a397f54fa4e31dd40da31128457c317714
Reviewed-on: https://chromium-review.googlesource.com/1069468
Commit-Ready: David Reveman <reveman@chromium.org>
Tested-by: David Reveman <reveman@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>

[modify] https://crrev.com/c1b9265f7504faf56a121b4b7a4d78110e64ee01/vm_tools/sommelier/sommelier.c

Project Member

Comment 2 by bugdroid1@chromium.org, Jun 14 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6a449226652734caeb1483e0da474b204be7169d

commit 6a449226652734caeb1483e0da474b204be7169d
Author: David Reveman <reveman@chromium.org>
Date: Thu Jun 14 16:42:23 2018

exo: Improve frame callbacks.

Use the compositor frame ack instead of begin-frame callback to
trigger these callbacks. The frame ack is sufficient to prevent
frames from being dropped, and provides minimal latency
back-pressure for clients that implement more advanced
scheduling.

This makes it possible to improve scheduling of frames for
Linux apps significantly. Sommelier can have the next frame
prepared as a dmabuf and ready to commit when we receive the
callback. This minimizes the chance that we'll miss a frame.

BUG=845659
TEST=exo_unittests --gtest_filter=SurfaceTest.RequestFrameCallback
TEST=sommelier /usr/lib/weston/weston-simple-shm
TEST=sommelier -X glxgears

Change-Id: I20f06618d9d550ab501f3945b3d25d4a5c20c218
Reviewed-on: https://chromium-review.googlesource.com/1097776
Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
Commit-Queue: David Reveman <reveman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567301}
[modify] https://crrev.com/6a449226652734caeb1483e0da474b204be7169d/components/exo/layer_tree_frame_sink_holder.cc
[modify] https://crrev.com/6a449226652734caeb1483e0da474b204be7169d/components/exo/layer_tree_frame_sink_holder.h
[modify] https://crrev.com/6a449226652734caeb1483e0da474b204be7169d/components/exo/surface_tree_host.cc
[modify] https://crrev.com/6a449226652734caeb1483e0da474b204be7169d/components/exo/surface_tree_host.h
[modify] https://crrev.com/6a449226652734caeb1483e0da474b204be7169d/components/exo/surface_unittest.cc

Sign in to add a comment