Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Issue 2876913003: Reland of gpu: GPU service scheduler. (Closed)

Created:
3 years, 7 months ago by sunnyps
Modified:
3 years, 7 months ago
CC:
chromium-reviews, rjkroege, mlamouri+watch-content_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, jam, yzshen+watch_chromium.org, abarth-chromium, jbauman+watch_chromium.org, Aaron Boodman, darin-cc_chromium.org, piman+watch_chromium.org, kalyank, danakj+watch_chromium.org, darin (slow to review)
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Reland of gpu: GPU service scheduler. (patchset #1 id:1 of https://codereview.chromium.org/2881813002/ ) Reason for revert: remove incorrect dcheck Original issue's description: > Revert of gpu: GPU service scheduler. (patchset #18 id:340001 of https://codereview.chromium.org/2814843002/ ) > > Reason for revert: > Suspected of breaking the Win7 Tests (dbg)(1) builder: > > https://build.chromium.org/p/chromium.win/builders/Win7%20Tests%20%28dbg%29%281%29/builds/59869 > > Sample stack trace: > > [6424:6796:0512/085713.197:FATAL:gpu_channel.cc(122)] Check failed: channel_messages_.empty(). > Backtrace: > base::debug::StackTrace::StackTrace [0x100AD557+55] > base::debug::StackTrace::StackTrace [0x100AD1F1+17] > logging::LogMessage::~LogMessage [0x1010103E+94] > gpu::GpuChannelMessageQueue::~GpuChannelMessageQueue [0x0AA6A1DE+126] > gpu::GpuChannelMessageQueue::`scalar deleting destructor' [0x0AA6D13F+15] > base::RefCountedThreadSafe<gpu::GpuChannelMessageQueue,base::DefaultRefCountedThreadSafeTraits<gpu::GpuChannelMessageQueue> >::DeleteInternal [0x0AA6E4A2+34] > base::DefaultRefCountedThreadSafeTraits<gpu::GpuChannelMessageQueue>::Destruct [0x0AA6E7BC+12] > base::RefCountedThreadSafe<gpu::GpuChannelMessageQueue,base::DefaultRefCountedThreadSafeTraits<gpu::GpuChannelMessageQueue> >::Release [0x0AA731D0+32] > scoped_refptr<gpu::GpuChannelMessageQueue>::Release [0x0AA7323B+11] > scoped_refptr<gpu::GpuChannelMessageQueue>::~scoped_refptr<gpu::GpuChannelMessageQueue> [0x0AA69A5A+26] > gpu::GpuChannelMessageFilter::~GpuChannelMessageFilter [0x0AA6A0F7+151] > gpu::GpuChannelMessageFilter::`vector deleting destructor' [0x0AA6CC4D+77] > base::RefCountedThreadSafe<IPC::MessageFilter,base::DefaultRefCountedThreadSafeTraits<IPC::MessageFilter> >::DeleteInternal [0x0B154D27+39] > base::DefaultRefCountedThreadSafeTraits<IPC::MessageFilter>::Destruct [0x0B154F3C+12] > base::RefCountedThreadSafe<IPC::MessageFilter,base::DefaultRefCountedThreadSafeTraits<IPC::MessageFilter> >::Release [0x0B1565DA+58] > scoped_refptr<IPC::MessageFilter>::Release [0x0B15662E+14] > scoped_refptr<IPC::MessageFilter>::~scoped_refptr<IPC::MessageFilter> [0x0B152A7A+26] > scoped_refptr<IPC::MessageFilter>::`scalar deleting destructor' [0x0B15411F+15] > std::allocator<scoped_refptr<IPC::MessageFilter> >::destroy<scoped_refptr<IPC::MessageFilter> > [0x0B151261+17] > std::allocator_traits<std::allocator<scoped_refptr<IPC::MessageFilter> > >::destroy<scoped_refptr<IPC::MessageFilter> > [0x0B15127F+15] > std::_Wrap_alloc<std::allocator<scoped_refptr<IPC::MessageFilter> > >::destroy<scoped_refptr<IPC::MessageFilter> > [0x0B151234+20] > std::_Destroy_range1<std::allocator<scoped_refptr<IPC::MessageFilter> >,scoped_refptr<IPC::MessageFilter> *> [0x0B15074B+43] > std::_Destroy_range<std::allocator<scoped_refptr<IPC::MessageFilter> >,scoped_refptr<IPC::MessageFilter> *> [0x0B1507AA+26] > std::vector<scoped_refptr<IPC::MessageFilter>,std::allocator<scoped_refptr<IPC::MessageFilter> > >::_Destroy [0x0B15740D+29] > std::vector<scoped_refptr<IPC::MessageFilter>,std::allocator<scoped_refptr<IPC::MessageFilter> > >::clear [0x0B15878E+46] > IPC::ChannelProxy::Context::OnChannelClosed [0x0B1558EB+395] > IPC::SyncChannel::SyncContext::OnChannelClosed [0x0B190416+38] > ??$Invoke@ABV?$scoped_refptr@VContext@ChannelProxy@IPC@@@@$$V@?$FunctorTraits@P8Context@ChannelProxy@IPC@@AEXXZX@internal@base@@SAXP8Context@ChannelProxy@IPC@@AEXXZABV?$scoped_refptr@VContext@ChannelProxy@IPC@@@@@Z [0x0B14F978+24] > base::internal::InvokeHelper<0,void>::MakeItSo<void (__thiscall IPC::ChannelProxy::Context::*const &)(void),scoped_refptr<IPC::ChannelProxy::Context> const &> [0x0B1500B8+40] > base::internal::Invoker<base::internal::BindState<void (__thiscall IPC::ChannelProxy::Context::*)(void),scoped_refptr<IPC::ChannelProxy::Context> >,void __cdecl(void)>::RunImpl<void (__thiscall IPC::ChannelProxy::Context::*const &)(void),std::tuple<scoped [0x0B1504A4+52] > base::internal::Invoker<base::internal::BindState<void (__thiscall IPC::ChannelProxy::Context::*)(void),scoped_refptr<IPC::ChannelProxy::Context> >,void __cdecl(void)>::Run [0x0B156904+36] > base::Callback<void __cdecl(void),0,0>::Run [0x10049A45+53] > base::debug::TaskAnnotator::RunTask [0x100B444C+476] > base::MessageLoop::RunTask [0x1012F94C+620] > base::MessageLoop::DeferOrRunPendingTask [0x1012DE4B+43] > base::MessageLoop::DoWork [0x1012E44F+239] > base::MessagePumpForIO::DoRunLoop [0x10136211+33] > base::MessagePumpWin::Run [0x101372FB+123] > base::MessageLoop::RunHandler [0x1012F5C5+293] > base::RunLoop::Run [0x101EDB26+166] > base::Thread::Run [0x10289D01+273] > base::Thread::ThreadMain [0x1028AE4F+863] > base::PlatformThread::Sleep [0x102659EC+380] > BaseThreadInitThunk [0x76A9338A+18] > RtlInitializeExceptionChain [0x77A39902+99] > RtlInitializeExceptionChain [0x77A398D5+54] > > Original issue's description: > > gpu: GPU service scheduler. > > > > The GPU service scheduler runs tasks (closures) containing command > > buffer work. Tasks are enqueued in sequences which represent indepdent > > streams of execution. A task in one sequence may wait on a sync token > > fence that's released on another sequence. Tasks can specify their sync > > token fences beforehand so that the scheduler won't run a sequence only > > to disable it due to a sync token wait. Tasks can check if they should > > yield so that a higher priority task may run. If a task decides to > > yield, it can continue execution by supplying a new closure which will > > run before any other scheduled tasks in that sequence. > > > > The scheduler maintains a priority queue of sequences ordered by > > sequence priority and then order number. Priority inversion because of > > sync token dependencies is handled by a simple priority ceiling scheme. > > Sequences which are expected to release sync tokens dependencies are > > assigned a priority (HIGH) that's higher than any client specified > > priorities. However, browser view context sequences can have an even > > higher priority (REAL_TIME). > > > > GPU channel IPC messages are run as tasks in the scheduler. Each client > > side stream is mapped to a sequence. The client is expected to use a > > small number of streams to partition its command buffers so there is no > > tracking of stream lifetimes in the service. The message filter posts > > messages as tasks. AsyncFlush is the only message for which sync token > > dependencies are given to the scheduler. > > > > The initial implementation uses the GPU main thread to run scheduled > > tasks. Future implementations, for example, could use a worker pool > > with task traits to specify which thread a task should run on. > > > > R=piman@chromium.org > > BUG=514813 > > 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 > > > > Review-Url: https://codereview.chromium.org/2814843002 > > Cr-Commit-Position: refs/heads/master@{#471187} > > Committed: https://chromium.googlesource.com/chromium/src/+/e7e36ccdaa3fcf63b330bc956eeeb73abf7c39ea > > TBR=piman@chromium.org,vmiura@chromium.org,dcheng@chromium.org,sadrul@chromium.org,sunnyps@chromium.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=514813 > > Review-Url: https://codereview.chromium.org/2881813002 > Cr-Commit-Position: refs/heads/master@{#471335} > Committed: https://chromium.googlesource.com/chromium/src/+/9d3cbf5bb0cca7fdcbfa22c63a18008e242f3bc9 TBR=piman@chromium.org,vmiura@chromium.org,dcheng@chromium.org,sadrul@chromium.org,jdonnelly@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=514813 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/2876913003 Cr-Commit-Position: refs/heads/master@{#471361} Committed: https://chromium.googlesource.com/chromium/src/+/8f9139e413e30b6e7a79a48c852cce057ac8bff9

Patch Set 1 #

Patch Set 2 : fix incorrect dcheck #

Patch Set 3 : comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1393 lines, -199 lines) Patch
M content/browser/compositor/gpu_process_transport_factory.cc View 1 3 chunks +9 lines, -4 lines 0 comments Download
M content/browser/gpu/compositor_util.cc View 1 1 chunk +4 lines, -3 lines 0 comments Download
M content/browser/gpu/gpu_ipc_browsertests.cc View 1 2 chunks +3 lines, -2 lines 0 comments Download
M content/browser/renderer_host/compositor_impl_android.cc View 1 3 chunks +13 lines, -4 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 3 chunks +7 lines, -3 lines 0 comments Download
A content/common/gpu_stream_constants.h View 1 chunk +26 lines, -0 lines 0 comments Download
M content/public/browser/gpu_utils.cc View 1 1 chunk +3 lines, -0 lines 0 comments Download
M content/public/common/content_switches.h View 1 2 chunks +2 lines, -0 lines 0 comments Download
M content/public/common/content_switches.cc View 1 2 chunks +6 lines, -0 lines 0 comments Download
M content/renderer/pepper/pepper_video_encoder_host.cc View 1 2 chunks +4 lines, -4 lines 0 comments Download
M content/renderer/pepper/ppb_graphics_3d_impl.cc View 1 2 chunks +2 lines, -1 line 0 comments Download
M content/renderer/render_thread_impl.cc View 1 6 chunks +11 lines, -11 lines 0 comments Download
M content/renderer/renderer_blink_platform_impl.cc View 1 3 chunks +3 lines, -3 lines 0 comments Download
M content/test/layouttest_support.cc View 1 2 chunks +3 lines, -2 lines 0 comments Download
M gpu/BUILD.gn View 1 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/common/BUILD.gn View 1 1 chunk +2 lines, -0 lines 0 comments Download
A gpu/command_buffer/common/scheduling_priority.h View 1 chunk +32 lines, -0 lines 0 comments Download
A gpu/command_buffer/common/scheduling_priority.cc View 1 chunk +28 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/BUILD.gn View 1 1 chunk +2 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.cc View 1 1 chunk +3 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gpu_preferences.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
A gpu/command_buffer/service/scheduler.h View 1 chunk +138 lines, -0 lines 0 comments Download
A gpu/command_buffer/service/scheduler.cc View 1 chunk +499 lines, -0 lines 0 comments Download
A gpu/command_buffer/service/scheduler_unittest.cc View 1 chunk +335 lines, -0 lines 0 comments Download
M gpu/ipc/client/command_buffer_proxy_impl.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M gpu/ipc/client/command_buffer_proxy_impl.cc View 1 3 chunks +1 line, -5 lines 0 comments Download
M gpu/ipc/client/gpu_channel_host.h View 1 4 chunks +0 lines, -8 lines 0 comments Download
M gpu/ipc/client/gpu_channel_host.cc View 1 2 chunks +0 lines, -8 lines 0 comments Download
M gpu/ipc/common/BUILD.gn View 1 1 chunk +0 lines, -1 line 0 comments Download
M gpu/ipc/common/gpu_messages.h View 1 1 chunk +1 line, -1 line 0 comments Download
M gpu/ipc/common/gpu_param_traits_macros.h View 1 2 chunks +3 lines, -2 lines 0 comments Download
M gpu/ipc/common/gpu_preferences.mojom View 1 1 chunk +1 line, -0 lines 0 comments Download
M gpu/ipc/common/gpu_preferences_struct_traits.h View 1 2 chunks +4 lines, -0 lines 0 comments Download
D gpu/ipc/common/gpu_stream_constants.h View 1 chunk +0 lines, -16 lines 0 comments Download
M gpu/ipc/common/struct_traits_unittest.cc View 1 2 chunks +2 lines, -0 lines 0 comments Download
M gpu/ipc/service/gpu_channel.h View 1 14 chunks +38 lines, -23 lines 0 comments Download
M gpu/ipc/service/gpu_channel.cc View 1 2 16 chunks +112 lines, -41 lines 0 comments Download
M gpu/ipc/service/gpu_channel_manager.h View 1 4 chunks +8 lines, -1 line 0 comments Download
M gpu/ipc/service/gpu_channel_manager.cc View 1 10 chunks +13 lines, -14 lines 0 comments Download
M gpu/ipc/service/gpu_channel_test_common.cc View 1 1 chunk +3 lines, -2 lines 0 comments Download
M gpu/ipc/service/gpu_channel_unittest.cc View 1 10 chunks +36 lines, -24 lines 0 comments Download
M gpu/ipc/service/gpu_command_buffer_stub.cc View 1 2 chunks +6 lines, -2 lines 0 comments Download
M services/ui/gpu/gpu_service.h View 1 2 chunks +3 lines, -0 lines 0 comments Download
M services/ui/gpu/gpu_service.cc View 1 3 chunks +8 lines, -3 lines 0 comments Download
M services/ui/public/cpp/gpu/context_provider_command_buffer.h View 1 3 chunks +3 lines, -3 lines 0 comments Download
M services/ui/public/cpp/gpu/context_provider_command_buffer.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M services/ui/public/cpp/gpu/gpu.cc View 1 3 chunks +9 lines, -5 lines 0 comments Download

Messages

Total messages: 8 (5 generated)
sunnyps
Created Reland of gpu: GPU service scheduler.
3 years, 7 months ago (2017-05-12 17:28:39 UTC) #1
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2876913003/310001
3 years, 7 months ago (2017-05-12 17:52:09 UTC) #5
commit-bot: I haz the power
3 years, 7 months ago (2017-05-12 17:53:52 UTC) #8
Message was sent while issue was closed.
Committed patchset #3 (id:310001) as
https://chromium.googlesource.com/chromium/src/+/8f9139e413e30b6e7a79a48c852c...

Powered by Google App Engine
This is Rietveld 408576698