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

Issue 1991623002: Avoid holding |incoming_queue_lock_| while waking up the message loop. (Closed)

Created:
4 years, 7 months ago by Anand Mistry (off Chromium)
Modified:
4 years, 6 months ago
Reviewers:
danakj
CC:
chromium-reviews, sadrul
Base URL:
https://chromium.googlesource.com/chromium/src.git@base-rw-lock
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Avoid holding |incoming_queue_lock_| while waking up the message loop. When constraining chrome to a limited number of cores (read: 2), it appears that the write syscall that wakes up the message loop thread may take a significant amount of time (>80ms) despite being a non-blocking write. During that time, if |incoming_queue_lock_| is being held, any other thread that tried to post a task to that message queue will be blocked in trying to acquire that lock. Committed: https://crrev.com/7fa6701bc5183bd5a73203d4fe1309f75ccfd5b4 Cr-Commit-Position: refs/heads/master@{#398458}

Patch Set 1 #

Patch Set 2 : Rebase #

Total comments: 14

Patch Set 3 : Address comments. #

Patch Set 4 : rebase #

Patch Set 5 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+61 lines, -38 lines) Patch
M base/message_loop/incoming_task_queue.h View 1 2 3 4 2 chunks +7 lines, -1 line 0 comments Download
M base/message_loop/incoming_task_queue.cc View 1 2 3 4 4 chunks +54 lines, -37 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 14 (3 generated)
Anand Mistry (off Chromium)
This is the primary motivation for doing https://codereview.chromium.org/1988563002/
4 years, 7 months ago (2016-05-19 01:58:58 UTC) #2
danakj
I just got this in my inbox I think overnight. Sorry for being slow I ...
4 years, 7 months ago (2016-05-19 20:32:11 UTC) #3
danakj
What would change if you just used two base::Locks instead of this new construct? https://codereview.chromium.org/1991623002/diff/20001/base/message_loop/incoming_task_queue.h ...
4 years, 7 months ago (2016-05-19 21:27:43 UTC) #4
danakj
Also, is there a way to make this diff smaller? I feel like you moved ...
4 years, 7 months ago (2016-05-19 21:28:37 UTC) #5
danakj
Ah.. ok I think I've stared at this enough to answer my previous questions. Using ...
4 years, 7 months ago (2016-05-19 22:29:37 UTC) #6
Anand Mistry (off Chromium)
I've removed one piece of refactoring, but the rest is necessary due to locking. https://codereview.chromium.org/1991623002/diff/20001/base/message_loop/incoming_task_queue.cc ...
4 years, 7 months ago (2016-05-20 04:45:38 UTC) #7
Anand Mistry (off Chromium)
Ping!
4 years, 6 months ago (2016-06-06 12:18:00 UTC) #8
danakj
LGTM
4 years, 6 months ago (2016-06-06 16:28:34 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1991623002/80001
4 years, 6 months ago (2016-06-08 00:19:10 UTC) #11
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 6 months ago (2016-06-08 01:58:45 UTC) #12
commit-bot: I haz the power
4 years, 6 months ago (2016-06-08 01:59:52 UTC) #14
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/7fa6701bc5183bd5a73203d4fe1309f75ccfd5b4
Cr-Commit-Position: refs/heads/master@{#398458}

Powered by Google App Engine
This is Rietveld 408576698