New issue
Advanced search Search tips

Issue 741159 link

Starred by 3 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Dec 12
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature

Blocking:
issue 611935



Sign in to add a comment

Some way to re-use the same shared memory for multiple DataPipes

Project Member Reported by mek@chromium.org, Jul 11 2017

Issue description

No idea how crazy this idea would be, but in https://chromium-review.googlesource.com/c/558192/13/storage%252Fbrowser%252Fblob%252Fblob_transport_strategy.cc#132 brought up some concerns about repeatedly creating shared memory segments (because of multiple DataPipes), where the old code would reuse the same shared memory segment for all.

So some way to pass the shared memory associated with one DataPipe to another might be a solution there. Not sure how it would work though, since at the point where you would want to "take back" the shared memory from one pipe to give it to another pipe you only have one end of the pipe, so code would have to be really careful to not somehow end up with multiple consumers and/or producers using the same shared memory at the same time.
 

Comment 1 by dmu...@chromium.org, Jul 17 2017

Chatting w/ jam@ and rockot@

They said that if we want to make sure we reuse the shared memory, the only way is to use a shared buffer. and that data pipe is basically a shared buffer w/ signaling, so it wouldn't be any faster.

(context: this only effects the case where there are multiple large items with files in between (ipc max,500mb), and there are multiple in between files)

So the other option here is to change requesting as data pipe to requesting population of a shared memory segment that we re-use w/ items.

Unclear which is going to be simpler to write.

Comment 2 by laforge@google.com, Nov 7 2017

Components: Internals>Network>Service

Comment 3 by laforge@google.com, Nov 7 2017

Components: -Internals>Network>Service Internals>Services>Network
Apologies, applied the wrong component in bulk.

Comment 4 by laforge@google.com, Nov 8 2017

Components: Internals>Services>Storage
Setting Internals>Services>Storage to all children of issue 611935

Comment 5 by dxie@chromium.org, May 22 2018

this doesn't block canary.

Comment 6 by dxie@chromium.org, May 22 2018

Components: -Internals>Services>Network
not related to network service.
Cc: rockot@google.com oksamyt@chromium.org
Labels: Needs-Feedback
mek@: does this seem to be a useful feature?
No idea how bad the overhead is of creating new shared memory regions over and over. Probably in the general case not much. So I guess the main thing here is if at some point we do decide to replace data pipes with some other mechanism built on top of other mojo primitives (which I think was the proposed solution whenever the suggestion to add new functionality to data pipes is brought up) this might be something to keep in mind.
Labels: -Needs-Feedback
Status: WontFix (was: Untriaged)
OK, thanks. I'm gonna close this then. I think two things are true:

1. We do ton of shared memory allocation all over the place, and I am not aware of any evidence that this is a performance issue.

2. The ship has pretty much sailed on leaving data pipe in the low-level Mojo API as a first-class primitive.

So I'd say if a situation comes up where we're actually impacted by allocation performance then this concern would naturally arise again. For now I'd rather clear it from the backlog.

Sign in to add a comment