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

Issue 998833002: Increase MessageAttachmentSet::kMaxDescriptorsPerMessage (Closed)

Created:
5 years, 9 months ago by Yusuke Sato
Modified:
5 years, 7 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, extensions-reviews_chromium.org, chromium-apps-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Increase MessageAttachmentSet::kMaxDescriptorsPerMessage to 128 so that dynamically linked NaCl applications like ARC (App Runtime for Chrome) start faster. ARC is a dynamically linked NaCl application which lists more than 70 DSO files in its nmf file. crrev.com/319931 allowed Chrome to pre-open up to 2 DSO files when it spawns a NaCl plugin process so that the plugin process can open/read/map the DSO files without issuing any Chrome IPC. This CL increase the number of DSO files Chrome can pre-open from 2 to 120+. BUG=348232 BUG=nativeclient:3802 TEST=ipc_tests, browser_tests (*PackagedAppTest.SuccessfulLoad) TEST=manually tested non-SFI ARC apps Committed: https://crrev.com/eaa3c5bf9ad0ac1730eec0bfe1f166f29fe20fc2 Cr-Commit-Position: refs/heads/master@{#320831}

Patch Set 1 #

Patch Set 2 : review #

Total comments: 5

Patch Set 3 : address comments #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+141 lines, -12 lines) Patch
M components/nacl/browser/nacl_host_message_filter.cc View 1 2 2 chunks +10 lines, -3 lines 0 comments Download
M ipc/ipc_channel_nacl.cc View 1 chunk +1 line, -1 line 3 comments Download
M ipc/ipc_message_attachment_set.h View 1 chunk +1 line, -1 line 0 comments Download
M ipc/ipc_send_fds_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ppapi/tests/extensions/extensions.gyp View 1 2 2 chunks +124 lines, -2 lines 0 comments Download
M ppapi/tests/extensions/packaged_app/test_packaged_app.cc View 1 chunk +3 lines, -3 lines 2 comments Download

Messages

Total messages: 25 (3 generated)
Yusuke Sato
Owners, could you take a look? Adam: ipc/ipc_message_attachment_set.cc ipc/ipc_send_fds_test.cc Dave: ipc/ipc_channel_nacl.cc ppapi/ Mark: component/nacl/ Thanks! ...
5 years, 9 months ago (2015-03-12 17:56:51 UTC) #2
agl
https://codereview.chromium.org/998833002/diff/20001/components/nacl/browser/nacl_host_message_filter.cc File components/nacl/browser/nacl_host_message_filter.cc (right): https://codereview.chromium.org/998833002/diff/20001/components/nacl/browser/nacl_host_message_filter.cc#newcode29 components/nacl/browser/nacl_host_message_filter.cc:29: const size_t kMaxPreOpenResourceFiles = 123; 123 is an odd ...
5 years, 9 months ago (2015-03-12 18:07:08 UTC) #3
Yusuke Sato
Thanks for the review. Please take another look. https://codereview.chromium.org/998833002/diff/20001/components/nacl/browser/nacl_host_message_filter.cc File components/nacl/browser/nacl_host_message_filter.cc (right): https://codereview.chromium.org/998833002/diff/20001/components/nacl/browser/nacl_host_message_filter.cc#newcode29 components/nacl/browser/nacl_host_message_filter.cc:29: const ...
5 years, 9 months ago (2015-03-12 20:58:48 UTC) #4
dmichael (off chromium)
+morrita, as the person most familiar with MessageAttachmentSet.
5 years, 9 months ago (2015-03-12 22:04:29 UTC) #6
agl
LGTM for ipc/
5 years, 9 months ago (2015-03-12 22:05:45 UTC) #7
dmichael (off chromium)
https://codereview.chromium.org/998833002/diff/40001/ipc/ipc_channel_nacl.cc File ipc/ipc_channel_nacl.cc (right): https://codereview.chromium.org/998833002/diff/40001/ipc/ipc_channel_nacl.cc#newcode40 ipc/ipc_channel_nacl.cc:40: contents->fds.resize(NACL_ABI_IMC_DESC_MAX); We want this number to be == kMaxDescriptorsPerMessage, ...
5 years, 9 months ago (2015-03-12 22:07:16 UTC) #8
Yusuke Sato
https://codereview.chromium.org/998833002/diff/40001/ipc/ipc_channel_nacl.cc File ipc/ipc_channel_nacl.cc (right): https://codereview.chromium.org/998833002/diff/40001/ipc/ipc_channel_nacl.cc#newcode40 ipc/ipc_channel_nacl.cc:40: contents->fds.resize(NACL_ABI_IMC_DESC_MAX); On 2015/03/12 22:07:16, dmichael wrote: > We want ...
5 years, 9 months ago (2015-03-12 22:19:28 UTC) #9
dmichael (off chromium)
ppapi lgtm
5 years, 9 months ago (2015-03-12 22:42:02 UTC) #10
Hajime Morrita
On 2015/03/12 22:42:02, dmichael wrote: > ppapi lgtm lgtm. The constant has been there and ...
5 years, 9 months ago (2015-03-12 23:32:43 UTC) #11
Yusuke Sato
Mark: ping?
5 years, 9 months ago (2015-03-13 19:34:57 UTC) #12
Mark Seaborn
LGTM https://codereview.chromium.org/998833002/diff/40001/ppapi/tests/extensions/packaged_app/test_packaged_app.cc File ppapi/tests/extensions/packaged_app/test_packaged_app.cc (right): https://codereview.chromium.org/998833002/diff/40001/ppapi/tests/extensions/packaged_app/test_packaged_app.cc#newcode27 ppapi/tests/extensions/packaged_app/test_packaged_app.cc:27: // TODO(yusukes): Once all the NaCl toolchains support ...
5 years, 9 months ago (2015-03-16 17:06:50 UTC) #13
Yusuke Sato
https://codereview.chromium.org/998833002/diff/40001/ppapi/tests/extensions/packaged_app/test_packaged_app.cc File ppapi/tests/extensions/packaged_app/test_packaged_app.cc (right): https://codereview.chromium.org/998833002/diff/40001/ppapi/tests/extensions/packaged_app/test_packaged_app.cc#newcode27 ppapi/tests/extensions/packaged_app/test_packaged_app.cc:27: // TODO(yusukes): Once all the NaCl toolchains support C++11, ...
5 years, 9 months ago (2015-03-16 21:27:28 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/998833002/40001
5 years, 9 months ago (2015-03-16 21:28:42 UTC) #16
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 9 months ago (2015-03-17 00:34:27 UTC) #17
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/eaa3c5bf9ad0ac1730eec0bfe1f166f29fe20fc2 Cr-Commit-Position: refs/heads/master@{#320831}
5 years, 9 months ago (2015-03-17 00:34:47 UTC) #18
Tom Sepez
Would like to ask for a revert pending the outcome of https://codereview.chromium.org/1120343002/. Can you tell ...
5 years, 7 months ago (2015-05-05 15:28:20 UTC) #19
Mark Seaborn
On 5 May 2015 at 08:28, <tsepez@chromium.org> wrote: > Would like to ask for a ...
5 years, 7 months ago (2015-05-05 19:18:10 UTC) #20
Yusuke Sato
What about changing ipc/ipc_message_attachment_set.h to something like #if defined(OS_CHROME) static const size_t kMaxDescriptorsPerMessage = 128; ...
5 years, 7 months ago (2015-05-05 20:27:23 UTC) #21
Mark Seaborn
On 5 May 2015 at 13:27, Yusuke Sato <yusukes@chromium.org> wrote: > What about changing ipc/ipc_message_attachment_set.h ...
5 years, 7 months ago (2015-05-05 20:54:13 UTC) #22
Yusuke Sato
On Tue, May 5, 2015 at 1:53 PM, Mark Seaborn <mseaborn@chromium.org> wrote: > On 5 ...
5 years, 7 months ago (2015-05-05 22:23:50 UTC) #23
Mark Seaborn
On 5 May 2015 at 15:23, Yusuke Sato <yusukes@chromium.org> wrote: > On Tue, May 5, ...
5 years, 7 months ago (2015-05-05 22:29:46 UTC) #24
Yusuke Sato
5 years, 7 months ago (2015-05-06 01:34:56 UTC) #25
Message was sent while issue was closed.
On Tue, May 5, 2015 at 3:29 PM, Mark Seaborn <mseaborn@chromium.org> wrote:

> On 5 May 2015 at 15:23, Yusuke Sato <yusukes@chromium.org> wrote:
>
>> On Tue, May 5, 2015 at 1:53 PM, Mark Seaborn <mseaborn@chromium.org>
>> wrote:
>>
>>> On 5 May 2015 at 13:27, Yusuke Sato <yusukes@chromium.org> wrote:
>>>
>>>> What about changing ipc/ipc_message_attachment_set.h to something like
>>>>
>>>> #if defined(OS_CHROME)
>>>>   static const size_t kMaxDescriptorsPerMessage = 128;
>>>> #else
>>>>   static const size_t kMaxDescriptorsPerMessage = 7;
>>>> #else
>>>>
>>>> so that Chrome for Android won't be affected?
>>>> The kMaxDescriptorsPerMessage is primarily for ARC (App Runtime for
Chrome)
>>>> and ARC's production target is only Chrome OS at this point. If this is
>>>> acceptable for you, I'll prepare a CL asap.
>>>>
>>>
>>> Please no, that's really hacky. :-(  Memory usage is still an issue on
>>> Chrome OS -- probably more so than desktop Chrome because many Chromebooks
>>> have limited memory.  Also it fragments test coverage because handling 128
>>> FDs would only be tested in OS_CHROME builds.
>>>
>>
>> Ok.. if the #ifdef hack above is not acceptable, please revert the
>> kMaxDescriptorsPerMessage = 128 change.
>>
>> Is there a reason you don't want to do streaming of FDs (i.e. one per
>>> message)?  Obviously it's some extra work to implement, but it doesn't seem
>>> like very much?
>>>
>>
>> My concern was performance. Since Lollipop version of ARC has 110+ small
>> DSOs, I think streaming FDs one by one would require 110+ extra Chrome IPCs
>> before sending NaClProcessMsg_Start. Since the intention of
>> the kMaxDescriptorsPerMessage change was to reduce ARC's startup time by a
>> few hundred milliseconds by reducing the total number of Chrome IPCs,
>> adding 110+ extra IPC is kind of opposite of the original intention of the
>> change.. and will probably increase the ARC startup time.
>>
>
> Have you checked whether sending many small Chrome IPC messages is slow,
> or are you guessing?  The messages would be async and pipelined, so there's
> no round trip between processes per message.  At the syscall level,
> sendmsg() will just be adding the messages to an in-kernel buffer, and
> recvmsg() may well remove all the messages from the buffer in one go.
>

No I haven't, I just guessed. I'll report the result to you tomorrow (I
just finished writing a CL for streaming FDs.)

tsepez:
Re reverting the kMaxDescriptorsPerMessage change, here is a CL:
https://codereview.chromium.org/1127913002/
I'll start code review with Mark and Adam shortly.

-Yusuke


>
> Cheers,
> Mark
>
>

To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698