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

Issue 1433373003: Use SequenceChecker to allow Timer to run in SequencedWorkerPool (Closed)

Created:
5 years, 1 month ago by jsbell
Modified:
4 years, 1 month ago
Reviewers:
danakj, gab, Nico
CC:
chromium-reviews, chirantan+watch_chromium.org, vmpstr+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use SequenceChecker to allow Timer to run in SequencedWorkerPool Timer was explicitly ensuring single-threaded usage by tracking the thread used for scheduling tasks. Generalize that to ensure sequenced task runner affinity via SequenceChecker, so it can be used by SequencedWorkerPool threads. BUG=552633 Committed: https://crrev.com/ffa30fe7f5ec8b13c9e41d41d828e4fb8e67110b Cr-Commit-Position: refs/heads/master@{#365568}

Patch Set 1 #

Patch Set 2 : Detach in ctor #

Total comments: 13

Patch Set 3 : Comments, tests #

Total comments: 10

Patch Set 4 : Feedback and MOAR tests #

Total comments: 4

Patch Set 5 : Review feedback #

Total comments: 6

Patch Set 6 : Review nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+255 lines, -40 lines) Patch
M base/timer/timer.h View 1 2 3 7 chunks +29 lines, -18 lines 0 comments Download
M base/timer/timer.cc View 1 2 3 4 5 6 chunks +22 lines, -20 lines 0 comments Download
M base/timer/timer_unittest.cc View 1 2 3 4 5 3 chunks +204 lines, -2 lines 0 comments Download

Messages

Total messages: 41 (14 generated)
danakj
How about unit testing with a sequenced worker pool? https://code.google.com/p/chromium/codesearch#chromium/src/base/timer/timer_unittest.cc&rcl=1447389431&l=16 https://codereview.chromium.org/1433373003/diff/20001/base/timer/timer.cc File base/timer/timer.cc (right): https://codereview.chromium.org/1433373003/diff/20001/base/timer/timer.cc#newcode103 ...
5 years, 1 month ago (2015-11-16 22:46:42 UTC) #4
gab
IIUC there is the sequence from which tasks are posted/abandoned (and this is what the ...
5 years, 1 month ago (2015-11-17 15:23:58 UTC) #5
jsbell
Not a high priority for me, but dusting this off a bit after the long ...
5 years ago (2015-12-01 00:23:10 UTC) #6
gab
lgtm % naming suggestion and test suggestion Cheers, Gab https://codereview.chromium.org/1433373003/diff/40001/base/timer/timer.h File base/timer/timer.h (right): https://codereview.chromium.org/1433373003/diff/40001/base/timer/timer.h#newcode165 base/timer/timer.h:165: ...
5 years ago (2015-12-03 22:26:09 UTC) #7
jsbell
Great suggestions - keep 'em coming! https://codereview.chromium.org/1433373003/diff/40001/base/timer/timer.h File base/timer/timer.h (right): https://codereview.chromium.org/1433373003/diff/40001/base/timer/timer.h#newcode165 base/timer/timer.h:165: scoped_refptr<SequencedTaskRunner> task_runner_; On ...
5 years ago (2015-12-05 01:15:40 UTC) #8
jsbell
gab - can you take one more look?
5 years ago (2015-12-08 22:03:05 UTC) #9
jsbell
gab@ - ping for one more look?
5 years ago (2015-12-14 20:41:35 UTC) #10
gab
Very nice test suite now :-), lgtm w/ two comments. Thanks! Gab PS: Sorry for ...
5 years ago (2015-12-15 16:47:41 UTC) #11
jsbell
Yep, good suggestions. Done, and thanks! (still not urgent, just trying to clean off my ...
5 years ago (2015-12-15 18:54:05 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1433373003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1433373003/80001
5 years ago (2015-12-15 18:55:14 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/129128)
5 years ago (2015-12-15 19:27:35 UTC) #17
jsbell
danakj@ - OWNERS stamp?
5 years ago (2015-12-15 19:32:53 UTC) #18
danakj
LGTM a few comments in the tests https://codereview.chromium.org/1433373003/diff/80001/base/timer/timer.cc File base/timer/timer.cc (right): https://codereview.chromium.org/1433373003/diff/80001/base/timer/timer.cc#newcode105 base/timer/timer.cc:105: destination_task_runner_.swap(task_runner); nit: ...
5 years ago (2015-12-15 22:57:18 UTC) #19
jsbell
Thanks! https://codereview.chromium.org/1433373003/diff/80001/base/timer/timer.cc File base/timer/timer.cc (right): https://codereview.chromium.org/1433373003/diff/80001/base/timer/timer.cc#newcode105 base/timer/timer.cc:105: destination_task_runner_.swap(task_runner); On 2015/12/15 22:57:18, danakj (behind on reviews) ...
5 years ago (2015-12-15 23:03:14 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1433373003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1433373003/100001
5 years ago (2015-12-15 23:07:37 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_android_rel_ng/builds/111189)
5 years ago (2015-12-16 01:50:41 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1433373003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1433373003/100001
5 years ago (2015-12-16 17:08:52 UTC) #27
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years ago (2015-12-16 18:27:52 UTC) #29
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/ffa30fe7f5ec8b13c9e41d41d828e4fb8e67110b Cr-Commit-Position: refs/heads/master@{#365568}
5 years ago (2015-12-16 18:29:27 UTC) #31
Nico
This made tsan unhappy: https://build.chromium.org/p/chromium.memory.fyi/builders/Linux%20TSan%20Tests/builds/14813 Please take a look, and if it takes a while ...
5 years ago (2015-12-16 23:22:07 UTC) #33
jsbell
A revert of this CL (patchset #6 id:100001) has been created in https://codereview.chromium.org/1532773002/ by jsbell@chromium.org. ...
5 years ago (2015-12-17 00:04:09 UTC) #34
jsbell
It looks like the race is between Timer::PostNewScheduledTask() setting scheduled_run_time_ and base::Timer::RunScheduledTask() checking scheduled_run_time_ ...
5 years ago (2015-12-17 00:35:21 UTC) #35
danakj
On Wed, Dec 16, 2015 at 4:35 PM, <jsbell@chromium.org> wrote: > It looks like the ...
5 years ago (2015-12-17 00:50:36 UTC) #36
gab
On 2015/12/17 00:50:36, danakj (behind on reviews) wrote: > On Wed, Dec 16, 2015 at ...
5 years ago (2015-12-17 18:34:54 UTC) #37
danakj
On Thu, Dec 17, 2015 at 10:34 AM, <gab@chromium.org> wrote: > On 2015/12/17 00:50:36, danakj ...
5 years ago (2015-12-17 20:15:11 UTC) #38
jsbell
FYI, I filed https://crbug.com/587199 to track the race, since I'm obviously not getting to it ...
4 years, 10 months ago (2016-02-17 21:26:28 UTC) #40
jsbell
4 years, 1 month ago (2016-11-15 00:08:49 UTC) #41
Message was sent while issue was closed.
FYI, closed this out since gab is picking it up:

https://codereview.chromium.org/2491613004/

Powered by Google App Engine
This is Rietveld 408576698