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

Issue 2044023003: Virtualize The Existence of a Scheduler Worker Thread (Closed)

Created:
4 years, 6 months ago by robliao
Modified:
4 years, 6 months ago
Reviewers:
gab, fdoray
CC:
chromium-reviews, gab+watch_chromium.org, robliao+watch_chromium.org, fdoray+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@detach
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Virtualize The Existence of a Scheduler Worker Thread SchedulerWorkers are expected to always remain alive in SchedulerWorkerPoolImpl. At the same time, we also want threads to sleep. This change disconnects the SchedulerWorker's lifetime from the thread's lifetime and allows the SchedulerWorkerPoolImpl to suggest when a worker can detach the associated thread. BUG=553459 Committed: https://crrev.com/86b90282101ddae90c07065d3edb612b9f0a972b Cr-Commit-Position: refs/heads/master@{#401441}

Patch Set 1 : #

Total comments: 40

Patch Set 2 : CR Feedback #

Total comments: 41

Patch Set 3 : CR Feedback gab@ #

Total comments: 30

Patch Set 4 : CR Feedback gab@ fdoray@ #

Patch Set 5 : Apply Renames #

Total comments: 14

Patch Set 6 : CR Feedback fdoray@ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+374 lines, -71 lines) Patch
M base/task_scheduler/scheduler_service_thread.cc View 1 2 3 4 2 chunks +6 lines, -1 line 0 comments Download
M base/task_scheduler/scheduler_worker.h View 1 2 3 4 5 5 chunks +50 lines, -12 lines 0 comments Download
M base/task_scheduler/scheduler_worker.cc View 1 2 3 4 5 2 chunks +164 lines, -53 lines 0 comments Download
M base/task_scheduler/scheduler_worker_pool_impl.cc View 1 2 3 4 3 chunks +8 lines, -1 line 0 comments Download
M base/task_scheduler/scheduler_worker_stack_unittest.cc View 1 2 3 4 2 chunks +9 lines, -3 lines 0 comments Download
M base/task_scheduler/scheduler_worker_unittest.cc View 1 2 3 4 5 3 chunks +137 lines, -1 line 0 comments Download

Depends on Patchset:

Messages

Total messages: 42 (20 generated)
robliao
4 years, 6 months ago (2016-06-07 16:22:04 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2044023003/20001
4 years, 6 months ago (2016-06-07 16:32:38 UTC) #5
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-07 18:26:33 UTC) #7
fdoray
https://codereview.chromium.org/2044023003/diff/20001/base/task_scheduler/scheduler_worker_thread.cc File base/task_scheduler/scheduler_worker_thread.cc (right): https://codereview.chromium.org/2044023003/diff/20001/base/task_scheduler/scheduler_worker_thread.cc#newcode17 base/task_scheduler/scheduler_worker_thread.cc:17: class SchedulerWorkerThread::Worker : public PlatformThread::Delegate { s/::Worker/::Thread/ ? https://codereview.chromium.org/2044023003/diff/20001/base/task_scheduler/scheduler_worker_thread.cc#newcode24 ...
4 years, 6 months ago (2016-06-08 17:51:49 UTC) #8
robliao
Thanks! https://codereview.chromium.org/2044023003/diff/20001/base/task_scheduler/scheduler_worker_thread.cc File base/task_scheduler/scheduler_worker_thread.cc (right): https://codereview.chromium.org/2044023003/diff/20001/base/task_scheduler/scheduler_worker_thread.cc#newcode17 base/task_scheduler/scheduler_worker_thread.cc:17: class SchedulerWorkerThread::Worker : public PlatformThread::Delegate { On 2016/06/08 ...
4 years, 6 months ago (2016-06-08 19:00:09 UTC) #12
gab
lg :-) https://codereview.chromium.org/2044023003/diff/20001/base/task_scheduler/scheduler_worker_thread.cc File base/task_scheduler/scheduler_worker_thread.cc (right): https://codereview.chromium.org/2044023003/diff/20001/base/task_scheduler/scheduler_worker_thread.cc#newcode17 base/task_scheduler/scheduler_worker_thread.cc:17: class SchedulerWorkerThread::Worker : public PlatformThread::Delegate { On ...
4 years, 6 months ago (2016-06-10 16:15:21 UTC) #13
robliao
https://codereview.chromium.org/2044023003/diff/20001/base/task_scheduler/scheduler_worker_thread.cc File base/task_scheduler/scheduler_worker_thread.cc (right): https://codereview.chromium.org/2044023003/diff/20001/base/task_scheduler/scheduler_worker_thread.cc#newcode17 base/task_scheduler/scheduler_worker_thread.cc:17: class SchedulerWorkerThread::Worker : public PlatformThread::Delegate { On 2016/06/10 16:15:20, ...
4 years, 6 months ago (2016-06-10 18:03:42 UTC) #16
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2044023003/140001
4 years, 6 months ago (2016-06-10 18:04:23 UTC) #18
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-10 19:46:12 UTC) #20
gab
Mostly lgtm % comments and SchedulerWorker::Thread rename (if Francois is on board). https://codereview.chromium.org/2044023003/diff/100001/base/task_scheduler/scheduler_worker_thread.cc File base/task_scheduler/scheduler_worker_thread.cc ...
4 years, 6 months ago (2016-06-13 19:23:06 UTC) #21
fdoray
https://codereview.chromium.org/2044023003/diff/140001/base/task_scheduler/scheduler_worker_thread.cc File base/task_scheduler/scheduler_worker_thread.cc (right): https://codereview.chromium.org/2044023003/diff/140001/base/task_scheduler/scheduler_worker_thread.cc#newcode101 base/task_scheduler/scheduler_worker_thread.cc:101: const size_t kDefaultStackSize = 0; constexpr https://codereview.chromium.org/2044023003/diff/140001/base/task_scheduler/scheduler_worker_thread.cc#newcode124 base/task_scheduler/scheduler_worker_thread.cc:124: // ...
4 years, 6 months ago (2016-06-13 20:31:18 UTC) #22
robliao
https://codereview.chromium.org/2044023003/diff/100001/base/task_scheduler/scheduler_worker_thread.cc File base/task_scheduler/scheduler_worker_thread.cc (right): https://codereview.chromium.org/2044023003/diff/100001/base/task_scheduler/scheduler_worker_thread.cc#newcode146 base/task_scheduler/scheduler_worker_thread.cc:146: DCHECK(ShouldExitForTesting() || !worker_); On 2016/06/13 19:23:05, gab wrote: > ...
4 years, 6 months ago (2016-06-13 23:23:29 UTC) #23
fdoray
lgtm
4 years, 6 months ago (2016-06-14 16:13:25 UTC) #24
gab
lgtm w/ question https://codereview.chromium.org/2044023003/diff/100001/base/task_scheduler/scheduler_worker_thread.cc File base/task_scheduler/scheduler_worker_thread.cc (right): https://codereview.chromium.org/2044023003/diff/100001/base/task_scheduler/scheduler_worker_thread.cc#newcode146 base/task_scheduler/scheduler_worker_thread.cc:146: DCHECK(ShouldExitForTesting() || !worker_); On 2016/06/13 23:23:28, ...
4 years, 6 months ago (2016-06-15 19:40:42 UTC) #25
robliao
I've applied the renames. PTAL. Thanks! > Wasn't it also because the rest of the ...
4 years, 6 months ago (2016-06-22 17:39:17 UTC) #28
fdoray
still lgtm % comments https://codereview.chromium.org/2044023003/diff/220001/base/task_scheduler/scheduler_worker.cc File base/task_scheduler/scheduler_worker.cc (right): https://codereview.chromium.org/2044023003/diff/220001/base/task_scheduler/scheduler_worker.cc#newcode201 base/task_scheduler/scheduler_worker.cc:201: // If a wakeup is ...
4 years, 6 months ago (2016-06-22 18:22:44 UTC) #29
robliao
Done. Thanks! https://codereview.chromium.org/2044023003/diff/220001/base/task_scheduler/scheduler_worker.cc File base/task_scheduler/scheduler_worker.cc (right): https://codereview.chromium.org/2044023003/diff/220001/base/task_scheduler/scheduler_worker.cc#newcode201 base/task_scheduler/scheduler_worker.cc:201: // If a wakeup is pending, then ...
4 years, 6 months ago (2016-06-22 19:24:33 UTC) #31
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2044023003/240001
4 years, 6 months ago (2016-06-22 19:25:04 UTC) #33
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-22 22:23:46 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2044023003/240001
4 years, 6 months ago (2016-06-22 22:43:30 UTC) #38
commit-bot: I haz the power
Committed patchset #6 (id:240001)
4 years, 6 months ago (2016-06-22 22:57:11 UTC) #40
commit-bot: I haz the power
4 years, 6 months ago (2016-06-22 23:03:22 UTC) #42
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/86b90282101ddae90c07065d3edb612b9f0a972b
Cr-Commit-Position: refs/heads/master@{#401441}

Powered by Google App Engine
This is Rietveld 408576698