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

Issue 1739993004: content: Implement dynamic priorities for raster threads.

Created:
4 years, 9 months ago by prashant.n
Modified:
4 years, 8 months ago
Reviewers:
reveman, vmpstr, ericrk
CC:
blink-worker-reviews_chromium.org, chromium-reviews, darin-cc_chromium.org, jam, kinuko+watch, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

content: Implement dynamic priorities for raster threads. With current implementation for raster threads, suppose background task is being run by background priority thread and if this task is rescheduled as foreground task, then executing the task by raster thread with same priority delays the completion of task. This patch implements changing the priority of raster thread while task is being executed by that thread, so that task execution can be speeded up or slowed down. The raster thread's priority is changed if already running task is rescheduled with new category. This patch handles speeding up of background task, which is rescheduled as foreground task and implementation is supported only on Android platform as of now. This patch implements - N static priority threads having normal priority, - 1 dynamic priority thread having background priority. BUG= CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Patch Set 1 #

Patch Set 2 : Test mismatch. #

Patch Set 3 : Test delays. #

Patch Set 4 : Don't check yet. #

Patch Set 5 : #

Patch Set 6 : test this. #

Patch Set 7 : android 1F + 1B #

Patch Set 8 : preparing for checkin. #

Total comments: 2

Patch Set 9 : fixed build error. #

Patch Set 10 : modified RWP::start function. #

Patch Set 11 : nits. #

Patch Set 12 : android only. #

Patch Set 13 : stop. #

Patch Set 14 : analyse playback #

Patch Set 15 : Test reschedule task. #

Patch Set 16 : Traces corrected. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -5 lines) Patch
M cc/raster/task_graph_runner.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -0 lines 0 comments Download
M cc/raster/task_graph_work_queue.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +36 lines, -0 lines 0 comments Download
M content/renderer/raster_worker_pool.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -5 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 70 (8 generated)
prashant.n
WIP patch, should we have something like this?
4 years, 9 months ago (2016-02-26 16:49:27 UTC) #3
reveman
The preferred sandbox used by chrome doesn't allow us to dynamically change the priority of ...
4 years, 9 months ago (2016-02-26 19:16:41 UTC) #4
ericrk
On 2016/02/26 19:16:41, reveman wrote: > The preferred sandbox used by chrome doesn't allow us ...
4 years, 9 months ago (2016-02-26 20:54:30 UTC) #5
prashant.n
reveman@, 1. Here I'm trying to change the priority of current thread from thread itself. ...
4 years, 9 months ago (2016-02-27 12:33:38 UTC) #6
prashant.n
Changing priority of thread within thread before task is getting executed is not a good ...
4 years, 9 months ago (2016-03-01 17:03:53 UTC) #7
reveman
On 2016/03/01 at 17:03:53, prashant.n wrote: > Changing priority of thread within thread before task ...
4 years, 9 months ago (2016-03-01 20:03:36 UTC) #8
prashant.n
> Sorry, I'm failing to see the motivation for changing the code in the first ...
4 years, 9 months ago (2016-03-02 06:26:04 UTC) #9
reveman
On 2016/03/02 at 06:26:04, prashant.n wrote: > > Sorry, I'm failing to see the motivation ...
4 years, 9 months ago (2016-03-02 15:24:22 UTC) #10
prashant.n
On 2016/03/02 15:24:22, reveman wrote: > On 2016/03/02 at 06:26:04, prashant.n wrote: > > > ...
4 years, 9 months ago (2016-03-02 18:47:28 UTC) #11
prashant.n
reveman@, patchset2 gives the data showing problem and occurrence is frequent, even on simple pages ...
4 years, 9 months ago (2016-03-04 15:19:51 UTC) #13
reveman
Check with vmpstr@ and ericrk@ who are making changes to raster work.
4 years, 9 months ago (2016-03-04 20:10:34 UTC) #14
prashant.n
On 2016/03/04 20:10:34, reveman wrote: > Check with vmpstr@ and ericrk@ who are making changes ...
4 years, 9 months ago (2016-03-05 03:06:46 UTC) #15
ericrk
On 2016/03/05 03:06:46, prashant.n wrote: > On 2016/03/04 20:10:34, reveman wrote: > > Check with ...
4 years, 9 months ago (2016-03-07 18:51:56 UTC) #16
prashant.n
On 2016/03/07 18:51:56, ericrk wrote: > On 2016/03/05 03:06:46, prashant.n wrote: > > On 2016/03/04 ...
4 years, 9 months ago (2016-03-07 19:17:03 UTC) #17
prashant.n
1. Data for two sites. (Contents zoomed and flinged from top to bottom). It is ...
4 years, 9 months ago (2016-03-08 15:19:08 UTC) #18
prashant.n
As per https://code.google.com/p/chromium/codesearch#chromium/src/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc&l=270&rcl=1457411445 we can change priority of thread from current process. Correct me if ...
4 years, 9 months ago (2016-03-08 15:22:21 UTC) #19
reveman
On 2016/03/08 at 15:22:21, prashant.n wrote: > As per https://code.google.com/p/chromium/codesearch#chromium/src/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc&l=270&rcl=1457411445 > > we can change ...
4 years, 9 months ago (2016-03-08 17:06:49 UTC) #20
prashant.n
> Btw, I'm not sure how to interpret the data above. Thread Priority = priority ...
4 years, 9 months ago (2016-03-08 18:15:13 UTC) #21
prashant.n
When I re-read the comment at https://code.google.com/p/chromium/codesearch#chromium/src/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h&l=66 it would give EPERM error if |who| is ...
4 years, 9 months ago (2016-03-09 04:42:02 UTC) #22
prashant.n
On 2016/03/09 04:42:02, prashant.n wrote: > When I re-read the comment at > > https://code.google.com/p/chromium/codesearch#chromium/src/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h&l=66 ...
4 years, 9 months ago (2016-03-09 14:31:31 UTC) #23
prashant.n
https://codereview.chromium.org/1784623005/ is the perf tryjob on android. I tested smoothness.top_25_smooth. I don't know exactly what ...
4 years, 9 months ago (2016-03-10 09:29:00 UTC) #24
reveman
On 2016/03/10 at 09:29:00, prashant.n wrote: > https://codereview.chromium.org/1784623005/ is the perf tryjob on android. I ...
4 years, 9 months ago (2016-03-10 17:11:39 UTC) #26
prashant.n
> You're changing the number of threads used for raster as part of that patch ...
4 years, 9 months ago (2016-03-10 18:07:28 UTC) #27
ericrk
On 2016/03/10 18:07:28, prashant.n wrote: > > You're changing the number of threads used for ...
4 years, 9 months ago (2016-03-11 00:55:27 UTC) #28
prashant.n
> I'm currently doing work that will allow GPU raster to effectively use > background ...
4 years, 9 months ago (2016-03-11 04:42:02 UTC) #29
prashant.n
Results for 1 foreground thread and 1 dynamic thread at https://codereview.chromium.org/1787453003/ For easy reference - ...
4 years, 9 months ago (2016-03-11 14:44:05 UTC) #30
prashant.n
Have a look at the patch, it's not final though.
4 years, 9 months ago (2016-03-11 14:51:38 UTC) #31
prashant.n
https://codereview.chromium.org/1739993004/diff/140001/cc/raster/task_graph_runner.cc File cc/raster/task_graph_runner.cc (right): https://codereview.chromium.org/1739993004/diff/140001/cc/raster/task_graph_runner.cc#newcode8 cc/raster/task_graph_runner.cc:8: #include <iomanip> Remove. https://codereview.chromium.org/1739993004/diff/140001/cc/raster/task_graph_runner.cc#newcode23 cc/raster/task_graph_runner.cc:23: void Task::AttachWorker(TaskWorker* worker) { ...
4 years, 9 months ago (2016-03-11 17:49:35 UTC) #32
prashant.n
PTAL, I'll implement win/linux/freebsd and slowing down task in subsequent patches.
4 years, 9 months ago (2016-03-14 14:19:37 UTC) #35
reveman
IMO the current version of this patch is much too complicated for the benefit it's ...
4 years, 9 months ago (2016-03-15 01:49:30 UTC) #36
prashant.n
On 2016/03/15 01:49:30, reveman wrote: > IMO the current version of this patch is much ...
4 years, 9 months ago (2016-03-15 04:34:17 UTC) #37
prashant.n
While writing unit test and verifying it on linux, I got that on linux we ...
4 years, 9 months ago (2016-03-15 13:46:37 UTC) #38
reveman
On 2016/03/15 at 13:46:37, prashant.n wrote: > While writing unit test and verifying it on ...
4 years, 9 months ago (2016-03-15 15:09:05 UTC) #39
prashant.n
> That's what I was suspecting. I don't think is worthwhile unless it works across ...
4 years, 9 months ago (2016-03-15 18:07:53 UTC) #40
prashant.n
As per https://code.google.com/p/chromium/codesearch#chromium/src/base/threading/platform_thread_unittest.cc&q=platform_thread_uni&sq=package:chromium&l=214, it would work on Windows. So there are 2 platforms which can ...
4 years, 9 months ago (2016-03-16 05:28:34 UTC) #41
prashant.n
> I'm focusing more on reducing tasks and maintaining states of it. task size*
4 years, 9 months ago (2016-03-16 05:29:14 UTC) #42
reveman
On 2016/03/16 at 05:29:14, prashant.n wrote: > > I'm focusing more on reducing tasks and ...
4 years, 9 months ago (2016-03-16 14:59:15 UTC) #43
prashant.n
On 2016/03/16 14:59:15, reveman wrote: > On 2016/03/16 at 05:29:14, prashant.n wrote: > > > ...
4 years, 9 months ago (2016-03-16 17:18:47 UTC) #44
reveman
On 2016/03/16 at 17:18:47, prashant.n wrote: > On 2016/03/16 14:59:15, reveman wrote: > > On ...
4 years, 9 months ago (2016-03-16 18:20:51 UTC) #46
ericrk
On 2016/03/16 18:20:51, reveman wrote: > On 2016/03/16 at 17:18:47, prashant.n wrote: > > On ...
4 years, 9 months ago (2016-03-16 18:48:08 UTC) #47
vmpstr
On 2016/03/16 18:48:08, ericrk wrote: > On 2016/03/16 18:20:51, reveman wrote: > > On 2016/03/16 ...
4 years, 9 months ago (2016-03-16 18:52:06 UTC) #48
prashant.n
On 2016/03/16 18:52:06, vmpstr wrote: > On 2016/03/16 18:48:08, ericrk wrote: > > On 2016/03/16 ...
4 years, 9 months ago (2016-03-17 02:17:05 UTC) #49
ericrk
On 2016/03/17 02:17:05, prashant.n wrote: > On 2016/03/16 18:52:06, vmpstr wrote: > > On 2016/03/16 ...
4 years, 9 months ago (2016-03-18 18:40:32 UTC) #50
prashant.n
> There definitely may be sites with slow raster tasks, but note that depending on ...
4 years, 9 months ago (2016-03-19 02:57:47 UTC) #51
vmpstr
On 2016/03/19 02:57:47, prashant.n wrote: > > There definitely may be sites with slow raster ...
4 years, 9 months ago (2016-03-21 19:55:17 UTC) #52
reveman
On 2016/03/21 at 19:55:17, vmpstr wrote: > On 2016/03/19 02:57:47, prashant.n wrote: > > > ...
4 years, 9 months ago (2016-03-21 20:50:32 UTC) #53
prashant.n
On 2016/03/21 20:50:32, reveman wrote: > On 2016/03/21 at 19:55:17, vmpstr wrote: > > On ...
4 years, 9 months ago (2016-03-21 21:52:51 UTC) #54
prashant.n
On 2016/03/21 20:50:32, reveman wrote: > On 2016/03/21 at 19:55:17, vmpstr wrote: > > On ...
4 years, 9 months ago (2016-03-21 21:52:55 UTC) #55
prashant.n
> ultimate solution when the number of layers grows to larger or recorded operations are ...
4 years, 9 months ago (2016-03-21 21:55:28 UTC) #56
prashant.n
> ultimate solution when the number of layers grows to larger or recorded operations are ...
4 years, 9 months ago (2016-03-21 21:55:31 UTC) #57
prashant.n
From the attached traces (scrolled theverge.com from top to bottom), it can be found that ...
4 years, 9 months ago (2016-03-23 13:21:50 UTC) #58
reveman
On 2016/03/23 at 13:21:50, prashant.n wrote: > From the attached traces (scrolled theverge.com from top ...
4 years, 9 months ago (2016-03-23 15:54:50 UTC) #59
prashant.n
> I'm skeptical. Sounds like a lot of work and a lot of added complexity ...
4 years, 9 months ago (2016-03-23 18:46:03 UTC) #60
ericrk
On 2016/03/23 18:46:03, prashant.n wrote: > > I'm skeptical. Sounds like a lot of work ...
4 years, 9 months ago (2016-03-24 16:14:12 UTC) #61
prashant.n
> A few questions: > - Can you attach the trace of theverge.com? I'd be ...
4 years, 9 months ago (2016-03-24 17:00:30 UTC) #62
prashant.n
> I'd attached traces from http://theverge.com only, https://codereview.chromium.org/1739993004/patch/260001/270002 are the traces I added, but I ...
4 years, 9 months ago (2016-03-24 18:05:47 UTC) #63
prashant.n
Skia changes used for testing, are uploaded at https://codereview.chromium.org/1828233003/
4 years, 9 months ago (2016-03-24 18:16:10 UTC) #64
prashant.n
> A few questions: > - Can you attach the trace of theverge.com? I'd be ...
4 years, 9 months ago (2016-03-26 10:40:16 UTC) #65
prashant.n
There is mistake in the patchset 15, I'll take data once again.
4 years, 8 months ago (2016-03-28 04:31:09 UTC) #66
prashant.n
The different traces added are Task::Rescheduled::Speedup, Task::Rescheduled::Slowdown, Task::Rescheduled::Same, Task::Scheduled::New, Task::Rescheduled::Cancelled. 1. With patch-set 16, I ...
4 years, 8 months ago (2016-03-28 13:57:54 UTC) #68
prashant.n
Pls. ignore the traces at crbug/598145.
4 years, 8 months ago (2016-03-28 13:58:42 UTC) #69
prashant.n
4 years, 8 months ago (2016-03-29 12:28:41 UTC) #70
I checked touch pinch zoom cases, touch scolling cases with traces in patchset
16 on Galaxy s4 device and observed following -
1. Flinging shows speedups and slowdowns [0.2 to 2%] of total tasks.
2. Pinch zoom shows cancels [1 to 4.5%] of total tasks.

So the task slitup would help in these gestures.

Powered by Google App Engine
This is Rietveld 408576698