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

Issue 704573002: Android: Use a spawning queue for child processes while we are at capacity. (Closed)

Created:
6 years, 1 month ago by auygun
Modified:
6 years ago
Reviewers:
ppi, Maria, Fredrik Öhrn
CC:
chromium-reviews, darin-cc_chromium.org, jam, Fredrik Öhrn
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Android: Use a spawning queue for child processes while we are at capacity. - Put child process spawning requests in a queue while we are at capacity and spawn when a service is freed. - Delay reusing freed services to avoid immediately reusing. BUG=429657 Committed: https://crrev.com/44f33c01325ccbe4bce804309636b102a74cc179 Cr-Commit-Position: refs/heads/master@{#309199}

Patch Set 1 #

Total comments: 10

Patch Set 2 : Fix. #

Total comments: 1

Patch Set 3 : Fix. #

Total comments: 16

Patch Set 4 : Fix. #

Patch Set 5 : Rebased on master. #

Total comments: 2

Patch Set 6 : Fix. #

Patch Set 7 : Added test. #

Total comments: 7

Patch Set 8 : Fix. #

Patch Set 9 : Fix. #

Patch Set 10 : Reverte last commit. #

Patch Set 11 : Removed assert. #

Patch Set 12 : Fix. #

Patch Set 13 : Rebased on master. #

Total comments: 2

Patch Set 14 : Fix. #

Total comments: 2

Patch Set 15 : Revert previous commit. #

Patch Set 16 : Fix for assert message. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+258 lines, -40 lines) Patch
M content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java View 1 2 3 4 5 6 7 8 9 10 11 10 chunks +172 lines, -37 lines 0 comments Download
M content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +86 lines, -3 lines 0 comments Download

Messages

Total messages: 45 (6 generated)
auygun
@reviewer: How does this patch look to you?
6 years, 1 month ago (2014-11-04 16:14:23 UTC) #2
ppi
Thanks! Please find some remarks below. https://codereview.chromium.org/704573002/diff/1/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java File content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java (right): https://codereview.chromium.org/704573002/diff/1/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java#newcode266 content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java:266: private static final ...
6 years, 1 month ago (2014-11-04 16:51:53 UTC) #3
auygun
https://codereview.chromium.org/704573002/diff/1/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java File content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java (right): https://codereview.chromium.org/704573002/diff/1/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java#newcode266 content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java:266: private static final Handler sHandler = new Handler(Looper.getMainLooper()) { ...
6 years, 1 month ago (2014-11-05 11:23:18 UTC) #4
ppi
Thanks! I think we should wait until we get the resolution of the spawn queue ...
6 years, 1 month ago (2014-11-05 18:45:36 UTC) #5
auygun
https://codereview.chromium.org/704573002/diff/1/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java File content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java (right): https://codereview.chromium.org/704573002/diff/1/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java#newcode274 content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java:274: start(pendingSpawn.context(), pendingSpawn.commandLine(), On 2014/11/05 18:45:35, ppi wrote: > On ...
6 years, 1 month ago (2014-11-06 11:55:58 UTC) #6
Fredrik Öhrn
https://codereview.chromium.org/704573002/diff/20001/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java File content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java (right): https://codereview.chromium.org/704573002/diff/20001/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java#newcode264 content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java:264: // is bound at that point, the process is ...
6 years, 1 month ago (2014-11-07 13:25:02 UTC) #8
ppi
https://codereview.chromium.org/704573002/diff/1/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java File content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java (right): https://codereview.chromium.org/704573002/diff/1/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java#newcode274 content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java:274: start(pendingSpawn.context(), pendingSpawn.commandLine(), On 2014/11/06 11:55:58, auygun wrote: > On ...
6 years, 1 month ago (2014-11-07 14:19:08 UTC) #9
auygun
https://codereview.chromium.org/704573002/diff/1/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java File content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java (right): https://codereview.chromium.org/704573002/diff/1/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java#newcode274 content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java:274: start(pendingSpawn.context(), pendingSpawn.commandLine(), On 2014/11/07 14:19:08, ppi wrote: > On ...
6 years, 1 month ago (2014-11-07 14:48:06 UTC) #10
ppi
Apologies for letting this slip off my radar. The CL looks good modulo the nits ...
6 years ago (2014-12-12 19:01:51 UTC) #12
Maria
https://codereview.chromium.org/704573002/diff/40001/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java File content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java (right): https://codereview.chromium.org/704573002/diff/40001/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java#newcode183 content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java:183: public synchronized void enqueue(final PendingSpawnData pendingSpawn) { javadoc for ...
6 years ago (2014-12-12 21:02:47 UTC) #13
auygun
https://codereview.chromium.org/704573002/diff/40001/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java File content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java (right): https://codereview.chromium.org/704573002/diff/40001/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java#newcode180 content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java:180: private static List<PendingSpawnData> sPendingSpawnDataList = On 2014/12/12 19:01:51, ppi ...
6 years ago (2014-12-16 09:28:26 UTC) #14
Maria
https://codereview.chromium.org/704573002/diff/40001/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java File content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java (right): https://codereview.chromium.org/704573002/diff/40001/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java#newcode180 content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java:180: private static List<PendingSpawnData> sPendingSpawnDataList = On 2014/12/16 09:28:26, auygun ...
6 years ago (2014-12-16 19:10:02 UTC) #15
auygun
https://codereview.chromium.org/704573002/diff/40001/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java File content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java (right): https://codereview.chromium.org/704573002/diff/40001/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java#newcode180 content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java:180: private static List<PendingSpawnData> sPendingSpawnDataList = On 2014/12/16 19:10:02, Maria ...
6 years ago (2014-12-17 14:57:31 UTC) #16
Maria
lgtm https://codereview.chromium.org/704573002/diff/120001/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java File content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java (right): https://codereview.chromium.org/704573002/diff/120001/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java#newcode38 content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java:38: Thread.sleep(100); We prefer to use CriteriaHelper in cases ...
6 years ago (2014-12-17 19:33:04 UTC) #17
Maria
On 2014/12/17 19:33:04, Maria wrote: > lgtm > > https://codereview.chromium.org/704573002/diff/120001/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java > File > content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java > ...
6 years ago (2014-12-18 02:00:32 UTC) #18
ppi
https://codereview.chromium.org/704573002/diff/120001/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java File content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java (right): https://codereview.chromium.org/704573002/diff/120001/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java#newcode38 content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java:38: Thread.sleep(100); On 2014/12/17 19:33:04, Maria wrote: > We prefer ...
6 years ago (2014-12-18 09:48:10 UTC) #19
auygun
https://codereview.chromium.org/704573002/diff/120001/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java File content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java (right): https://codereview.chromium.org/704573002/diff/120001/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java#newcode38 content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java:38: Thread.sleep(100); On 2014/12/17 19:33:04, Maria wrote: > We prefer ...
6 years ago (2014-12-18 10:10:11 UTC) #20
auygun
On 2014/12/18 02:00:32, Maria wrote: > On 2014/12/17 19:33:04, Maria wrote: > > lgtm > ...
6 years ago (2014-12-18 10:12:52 UTC) #21
ppi
https://codereview.chromium.org/704573002/diff/120001/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java File content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java (right): https://codereview.chromium.org/704573002/diff/120001/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java#newcode192 content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java:192: assertEquals(1, ChildProcessLauncher.allocatedConnectionsCountForTesting(appContext)); On 2014/12/18 10:10:11, auygun wrote: > On ...
6 years ago (2014-12-18 10:13:51 UTC) #22
auygun
On 2014/12/18 10:13:51, ppi wrote: > https://codereview.chromium.org/704573002/diff/120001/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java > File > content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java > (right): > > ...
6 years ago (2014-12-18 10:41:42 UTC) #23
ppi
Now it's failing the delayed spawn: 0aebb: 12-18 10:47:11.975 15598 15626 E AndroidRuntime: FATAL EXCEPTION: ...
6 years ago (2014-12-18 13:35:38 UTC) #24
auygun
On 2014/12/18 13:35:38, ppi wrote: > Now it's failing the delayed spawn: > > 0aebb: ...
6 years ago (2014-12-18 13:47:48 UTC) #25
ppi
Sounds reasonable.
6 years ago (2014-12-18 13:50:20 UTC) #26
auygun
On 2014/12/18 13:50:20, ppi wrote: > Sounds reasonable. Or we can move part of start() ...
6 years ago (2014-12-18 14:09:05 UTC) #27
ppi
Either works. I don't think the assert is that useful. If we want to make ...
6 years ago (2014-12-18 14:15:43 UTC) #28
ppi
New error: 9b8bb: 12-18 15:40:17.055 15684 15712 E AndroidRuntime: java.lang.AssertionError 9b8bb: 12-18 15:40:17.055 15684 15712 ...
6 years ago (2014-12-18 16:14:49 UTC) #29
auygun
On 2014/12/18 16:14:49, ppi wrote: > New error: > > 9b8bb: 12-18 15:40:17.055 15684 15712 ...
6 years ago (2014-12-18 16:33:10 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/704573002/240001
6 years ago (2014-12-19 12:03:07 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/31597)
6 years ago (2014-12-19 12:09:17 UTC) #34
auygun
Finally it passes all tests.
6 years ago (2014-12-19 12:18:23 UTC) #35
ppi
Almost there, please take a look at one more thing below. https://codereview.chromium.org/704573002/diff/240001/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java File content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java (right): ...
6 years ago (2014-12-19 12:28:52 UTC) #36
ppi
Almost there, please take a look at one more thing below.
6 years ago (2014-12-19 12:28:55 UTC) #37
auygun
https://codereview.chromium.org/704573002/diff/240001/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java File content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java (right): https://codereview.chromium.org/704573002/diff/240001/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java#newcode42 content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java:42: return ChildProcessLauncher.allocatedConnectionsCountForTesting( On 2014/12/19 12:28:52, ppi wrote: > To ...
6 years ago (2014-12-19 13:18:17 UTC) #38
ppi
https://codereview.chromium.org/704573002/diff/260001/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java File content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java (right): https://codereview.chromium.org/704573002/diff/260001/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java#newcode38 content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java:38: assertFalse("Failed connection wasn't released from the allocator.", Apologies for ...
6 years ago (2014-12-19 13:40:34 UTC) #39
auygun
https://codereview.chromium.org/704573002/diff/260001/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java File content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java (right): https://codereview.chromium.org/704573002/diff/260001/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java#newcode38 content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java:38: assertFalse("Failed connection wasn't released from the allocator.", On 2014/12/19 ...
6 years ago (2014-12-19 14:02:35 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/704573002/300001
6 years ago (2014-12-19 14:04:10 UTC) #42
commit-bot: I haz the power
Committed patchset #16 (id:300001)
6 years ago (2014-12-19 14:57:48 UTC) #43
commit-bot: I haz the power
Patchset 16 (id:??) landed as https://crrev.com/44f33c01325ccbe4bce804309636b102a74cc179 Cr-Commit-Position: refs/heads/master@{#309199}
6 years ago (2014-12-19 14:58:40 UTC) #44
ppi
6 years ago (2014-12-19 14:59:57 UTC) #45
Message was sent while issue was closed.
Aaand it's in:). Thanks for working on this!

Powered by Google App Engine
This is Rietveld 408576698