New issue
Advanced search Search tips

Issue 706456 link

Starred by 7 users

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Feature

Blocking:
issue 683994
issue 728350
issue 769282



Sign in to add a comment

GPU Discardable Memory

Project Member Reported by ericrk@chromium.org, Mar 29 2017

Issue description

In Chrome, browser and renderer processes make heavy use of GPU memory. Each browser or renderer has its own caches, each cache with its own memory limits. As there is no central controller, cache limits must be chosen conservatively, assuming that many caches may be live simultaneously. This leads to inefficient use of memory. Not only is the upper limit on memory mostly unconstrained, but a renderer or browser performing heavy GPU work is given the same cache limits as one performing light work.

This bug tracks the implementation of “Discardable GPU Memory”. This is memory that:
 - Can be unlocked by a client (renderer/browser), allowing the GPU process to delete it at-will.
 - Is stored in a single cache in the GPU process, allowing for a global eviction policy.

These features allow the GPU process to maintain a single cache of GPU memory from multiple clients, deleting objects as necessary to enforce a global GPU memory limit. 

See this doc for more info:
https://docs.google.com/document/d/1WoatXUZ7utZeKNcpOt3LXFPCc6STcmrtYqmgkZPrjds/edit?usp=sharing
 
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 30 2017

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

commit 6298c71c94585f0eb01c9fc1b420d04e935b5239
Author: ericrk <ericrk@chromium.org>
Date: Thu Mar 30 01:05:42 2017

DiscardableHandle Implementation

This change adds a DiscardableHandle class, which acts as the primary
synchronization mechanism for the GPU Discardable Memory system.

This is the first in a sequence of CLs which implement the GPU
Discardable Memory system. This class is currently only created/used by
unit test code.

BUG=706456
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2732223004
Cr-Commit-Position: refs/heads/master@{#460610}

[modify] https://crrev.com/6298c71c94585f0eb01c9fc1b420d04e935b5239/gpu/BUILD.gn
[modify] https://crrev.com/6298c71c94585f0eb01c9fc1b420d04e935b5239/gpu/command_buffer/common/BUILD.gn
[add] https://crrev.com/6298c71c94585f0eb01c9fc1b420d04e935b5239/gpu/command_buffer/common/discardable_handle.cc
[add] https://crrev.com/6298c71c94585f0eb01c9fc1b420d04e935b5239/gpu/command_buffer/common/discardable_handle.h
[add] https://crrev.com/6298c71c94585f0eb01c9fc1b420d04e935b5239/gpu/command_buffer/common/discardable_handle_unittest.cc

Comment 2 by junov@chromium.org, Apr 24 2017

Blocking: 683994

Comment 3 by vmi...@chromium.org, May 31 2017

Blocking: 728350
Project Member

Comment 4 by bugdroid1@chromium.org, Jun 26 2017

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

commit 40936ad890a7edf653ab7a7603f914037afceeb7
Author: Eric Karl <ericrk@chromium.org>
Date: Mon Jun 26 21:32:30 2017

Threadsafe lock GPU Discardable

Adds a pair of functions:
ContextSupport::ThreadSafeShallowLockDiscardableTexture and
ContextSupport::CompleteLockDiscardableTextureOnContextThread

When used together, these functions allow a caller to lock a discardable
GPU texture without holding the context lock. This is useful when the
result of such a lock operation will determine whether GPU work needs
to scheduled.

Bug: 438325, 706456
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I0e110c4325fa1989a642d3c5281f85b2c3988b58
Reviewed-on: https://chromium-review.googlesource.com/544043
Commit-Queue: Eric Karl <ericrk@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#482414}
[modify] https://crrev.com/40936ad890a7edf653ab7a7603f914037afceeb7/cc/test/test_context_support.cc
[modify] https://crrev.com/40936ad890a7edf653ab7a7603f914037afceeb7/cc/test/test_context_support.h
[modify] https://crrev.com/40936ad890a7edf653ab7a7603f914037afceeb7/gpu/command_buffer/client/context_support.h
[modify] https://crrev.com/40936ad890a7edf653ab7a7603f914037afceeb7/gpu/command_buffer/client/gles2_implementation.cc
[modify] https://crrev.com/40936ad890a7edf653ab7a7603f914037afceeb7/gpu/command_buffer/client/gles2_implementation.h

Comment 5 by junov@chromium.org, Oct 2 2017

Blocking: 769282

Sign in to add a comment