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

Issue 783973 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature

Blocking:
issue 789447



Sign in to add a comment

GpuMediaService should run on a sequence rather than a thread

Project Member Reported by sande...@chromium.org, Nov 10 2017

Issue description

Currently, GpuMediaService is configured with |use_own_thread| = true, so that it is not blocked by (and conversely does not block) the GPU main thread.

However, since GpuMediaService also shuts itself down when inactive, auxiliary objects that outlive media services cannot rely on the SingleThreadTaskRunner sticking around. The result is passing service_manager::ServiceContextRef objects everywhere to prevent the thread from dying.

There are two obvious alternatives:
  1) Don't shut down the thread at all. Saving one thread may not be enough to justify the effort. We can still destroy all of the service objects on a timeout if desired.
  2) Switch to a SequenceTaskRunner running on a long-lived thread pool.

Since (2) appears to be the target state for Chromium overall, this bug tracks implementing that solution.
 
Cc: w...@chromium.org
watk@: You mentioned attempting a prototype of this. Did you make any progress?

Comment 2 by xhw...@chromium.org, Nov 10 2017

Cc: roc...@chromium.org
+rockot FYI

Comment 3 by w...@chromium.org, Nov 13 2017

I don't think I tried this, but +1 to the idea.

Comment 4 by xhw...@chromium.org, Nov 15 2017

Maybe what we need is just specify a TaskRunner instead of "use_own_thread = true"? 

See https://chromium-review.googlesource.com/770991

I haven't tested it yet. Will try this week.

Comment 5 by roc...@chromium.org, Nov 15 2017

Right, that should be the only change needed.
Project Member

Comment 6 by bugdroid1@chromium.org, Nov 17 2017

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

commit 079fa037650802e43e8e0b8c2003bbffcd6067ef
Author: Xiaohan Wang <xhwang@chromium.org>
Date: Fri Nov 17 19:13:49 2017

media: Run MediaService on a sequence instead of on its own thread

BUG= 783973 

Change-Id: I74cdc80d3cd4187ce0741fa722e2527329347ec5
Reviewed-on: https://chromium-review.googlesource.com/770991
Reviewed-by: Robert Liao <robliao@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Reviewed-by: Frank Liberato <liberato@chromium.org>
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517503}
[modify] https://crrev.com/079fa037650802e43e8e0b8c2003bbffcd6067ef/content/gpu/gpu_service_factory.cc

Comment 7 by xhw...@chromium.org, Nov 17 2017

Status: Fixed (was: Available)

Comment 8 by xhw...@chromium.org, Nov 29 2017

Blocking: 789447

Sign in to add a comment