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

Issue 2531883002: TaskScheduler: Set the IO allowed bit in TaskTracker::RunTask(). (Closed)

Created:
4 years ago by fdoray
Modified:
4 years ago
Reviewers:
robliao, danakj, gab
CC:
chromium-reviews, gab+watch_chromium.org, robliao+watch_chromium.org, fdoray+watch_chromium.org, vmpstr+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

TaskScheduler: Set the IO allowed bit in TaskTracker::RunTask(). Before this CL, tasks without the WithFileIO() trait were allowed to perform synchronous file IO operations if they were mapped to a pool created with IORestriction::ALLOWED (this happens with a TaskScheduler created by CreateAndSetSimpleTaskScheduler(). With this CL, the IO allowed bit is always updated before running a task, based on the presence of the WithFileIO() trait. BUG=553459 Committed: https://crrev.com/f7d7e2f5926a928e472a06fcffb7c7a7dd154b32 Cr-Commit-Position: refs/heads/master@{#435942}

Patch Set 1 #

Total comments: 5

Patch Set 2 : update ScopedTaskScheduler #

Patch Set 3 : CR gab #12 + fix build error #

Patch Set 4 : fix test error #

Total comments: 2

Patch Set 5 : CR robliao #22 (reorder reset) #

Total comments: 8

Patch Set 6 : CR danakj #32 (WrapUnique) #

Patch Set 7 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -120 lines) Patch
M base/task_scheduler/scheduler_worker_pool_impl.h View 2 chunks +0 lines, -5 lines 0 comments Download
M base/task_scheduler/scheduler_worker_pool_impl.cc View 1 2 3 4 5 6 3 chunks +3 lines, -11 lines 0 comments Download
M base/task_scheduler/scheduler_worker_pool_impl_unittest.cc View 1 2 3 4 5 6 6 chunks +8 lines, -67 lines 0 comments Download
M base/task_scheduler/scheduler_worker_pool_params.h View 4 chunks +2 lines, -11 lines 0 comments Download
M base/task_scheduler/scheduler_worker_pool_params.cc View 1 chunk +0 lines, -2 lines 0 comments Download
M base/task_scheduler/task_scheduler.cc View 1 chunk +0 lines, -1 line 0 comments Download
M base/task_scheduler/task_scheduler_impl_unittest.cc View 1 chunk +3 lines, -7 lines 0 comments Download
M base/task_scheduler/task_tracker.cc View 1 2 3 4 5 6 2 chunks +8 lines, -7 lines 0 comments Download
M base/task_scheduler/task_tracker_unittest.cc View 1 2 3 4 5 6 1 chunk +28 lines, -0 lines 0 comments Download
M base/test/scoped_task_scheduler.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M base/threading/sequenced_worker_pool_unittest.cc View 1 chunk +0 lines, -1 line 0 comments Download
M components/task_scheduler_util/initialization_util.cc View 1 2 2 chunks +4 lines, -7 lines 0 comments Download

Messages

Total messages: 51 (29 generated)
fdoray
PTAL This is important to prevent tasks without the WithFileIO() trait to AssertIOAllowed() in a ...
4 years ago (2016-11-25 18:50:48 UTC) #4
robliao
On 2016/11/25 18:50:48, fdoray wrote: > PTAL > > This is important to prevent tasks ...
4 years ago (2016-11-28 14:50:24 UTC) #7
robliao
https://codereview.chromium.org/2531883002/diff/1/base/task_scheduler/scheduler_worker_pool_params.h File base/task_scheduler/scheduler_worker_pool_params.h (left): https://codereview.chromium.org/2531883002/diff/1/base/task_scheduler/scheduler_worker_pool_params.h#oldcode22 base/task_scheduler/scheduler_worker_pool_params.h:22: }; ScopedTaskScheduler needs updating.
4 years ago (2016-11-28 14:50:34 UTC) #8
fdoray
PTAnL
4 years ago (2016-11-28 16:34:02 UTC) #10
gab
lgtm % nits and compile :) https://codereview.chromium.org/2531883002/diff/1/base/task_scheduler/task_tracker_unittest.cc File base/task_scheduler/task_tracker_unittest.cc (right): https://codereview.chromium.org/2531883002/diff/1/base/task_scheduler/task_tracker_unittest.cc#newcode441 base/task_scheduler/task_tracker_unittest.cc:441: std::unique_ptr<Task> task_with_file_io(new Task( ...
4 years ago (2016-11-28 16:45:47 UTC) #12
fdoray
robliao@: PTAL https://codereview.chromium.org/2531883002/diff/1/base/task_scheduler/task_tracker_unittest.cc File base/task_scheduler/task_tracker_unittest.cc (right): https://codereview.chromium.org/2531883002/diff/1/base/task_scheduler/task_tracker_unittest.cc#newcode441 base/task_scheduler/task_tracker_unittest.cc:441: std::unique_ptr<Task> task_with_file_io(new Task( On 2016/11/28 16:45:47, gab ...
4 years ago (2016-11-28 17:44:28 UTC) #16
robliao
lgtm https://codereview.chromium.org/2531883002/diff/60001/base/task_scheduler/task_tracker.cc File base/task_scheduler/task_tracker.cc (right): https://codereview.chromium.org/2531883002/diff/60001/base/task_scheduler/task_tracker.cc#newcode264 base/task_scheduler/task_tracker.cc:264: ThreadRestrictions::SetSingletonAllowed(previous_singleton_allowed); I presume this will change with the ...
4 years ago (2016-11-28 22:17:41 UTC) #22
fdoray
danakj@: PTAL https://codereview.chromium.org/2531883002/diff/60001/base/task_scheduler/task_tracker.cc File base/task_scheduler/task_tracker.cc (right): https://codereview.chromium.org/2531883002/diff/60001/base/task_scheduler/task_tracker.cc#newcode264 base/task_scheduler/task_tracker.cc:264: ThreadRestrictions::SetSingletonAllowed(previous_singleton_allowed); On 2016/11/28 22:17:41, robliao wrote: > ...
4 years ago (2016-11-28 22:36:15 UTC) #27
danakj
On 2016/11/28 14:50:24, robliao wrote: > On 2016/11/25 18:50:48, fdoray wrote: > > PTAL > ...
4 years ago (2016-11-28 22:38:19 UTC) #29
danakj
https://codereview.chromium.org/2531883002/diff/80001/base/task_scheduler/scheduler_worker_pool_impl.cc File base/task_scheduler/scheduler_worker_pool_impl.cc (right): https://codereview.chromium.org/2531883002/diff/80001/base/task_scheduler/scheduler_worker_pool_impl.cc#newcode312 base/task_scheduler/scheduler_worker_pool_impl.cc:312: new SchedulerWorkerPoolImpl(params.name(), fwiw auto & makeunique would be nice ...
4 years ago (2016-11-28 22:55:56 UTC) #30
fdoray
On 2016/11/28 22:38:19, danakj wrote: > On 2016/11/28 14:50:24, robliao wrote: > > On 2016/11/25 ...
4 years ago (2016-11-28 23:00:13 UTC) #31
danakj
On Mon, Nov 28, 2016 at 3:00 PM, <fdoray@chromium.org> wrote: > On 2016/11/28 22:38:19, danakj ...
4 years ago (2016-11-28 23:15:05 UTC) #32
fdoray
danakj@: PTAnL https://codereview.chromium.org/2531883002/diff/80001/base/task_scheduler/scheduler_worker_pool_impl.cc File base/task_scheduler/scheduler_worker_pool_impl.cc (right): https://codereview.chromium.org/2531883002/diff/80001/base/task_scheduler/scheduler_worker_pool_impl.cc#newcode312 base/task_scheduler/scheduler_worker_pool_impl.cc:312: new SchedulerWorkerPoolImpl(params.name(), On 2016/11/28 22:55:56, danakj wrote: ...
4 years ago (2016-11-29 15:41:21 UTC) #35
fdoray
> Makes sense, but also makes me wonder if now is a good time to ...
4 years ago (2016-12-01 16:59:35 UTC) #36
danakj
https://codereview.chromium.org/2531883002/diff/80001/base/task_scheduler/task_tracker.cc File base/task_scheduler/task_tracker.cc (right): https://codereview.chromium.org/2531883002/diff/80001/base/task_scheduler/task_tracker.cc#newcode227 base/task_scheduler/task_tracker.cc:227: ThreadRestrictions::SetIOAllowed(task->traits.with_file_io()); On 2016/11/29 15:41:20, fdoray wrote: > On 2016/11/28 ...
4 years ago (2016-12-01 21:59:04 UTC) #37
fdoray
Ptanl https://codereview.chromium.org/2531883002/diff/80001/base/task_scheduler/task_tracker.cc File base/task_scheduler/task_tracker.cc (right): https://codereview.chromium.org/2531883002/diff/80001/base/task_scheduler/task_tracker.cc#newcode227 base/task_scheduler/task_tracker.cc:227: ThreadRestrictions::SetIOAllowed(task->traits.with_file_io()); On 2016/12/01 21:59:04, danakj wrote: > On ...
4 years ago (2016-12-01 22:30:43 UTC) #38
danakj
Ahhh ok thanks. LGTM
4 years ago (2016-12-02 00:03:58 UTC) #39
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/2531883002/100001
4 years ago (2016-12-02 01:41:09 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/115740) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years ago (2016-12-02 01:45:08 UTC) #44
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/2531883002/120001
4 years ago (2016-12-02 13:32:09 UTC) #47
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years ago (2016-12-02 15:42:50 UTC) #49
commit-bot: I haz the power
4 years ago (2016-12-02 15:46:04 UTC) #51
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/f7d7e2f5926a928e472a06fcffb7c7a7dd154b32
Cr-Commit-Position: refs/heads/master@{#435942}

Powered by Google App Engine
This is Rietveld 408576698