Closed
Bug 1167381
Opened 10 years ago
Closed 7 years ago
Add support for sending mach ports over IPC
Categories
(Core :: IPC, defect)
Core
IPC
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: jrmuizel, Assigned: gw280)
References
Details
This is needed if we want to do shared memory allocation in the child instead of the parent. (We don't want to give the child access to the parent's task_t)
The basic idea would be to mach_msg_send the port before sending the message over ipc and read it after receiving the associated ipc message.
Hopefully, this would work ok...
Comment 1•10 years ago
|
||
ISTM there's a simpler way to achieve this. When the child wants to allocated shmem, we send a control message over the IPC channel asking for one. This control message can be handled directly on the I/O thread and hand back a shmem handle without having to round-trip to the main thread.
Reporter | ||
Comment 2•10 years ago
|
||
(In reply to Benjamin Smedberg [:bsmedberg] from comment #1)
> ISTM there's a simpler way to achieve this. When the child wants to
> allocated shmem, we send a control message over the IPC channel asking for
> one. This control message can be handled directly on the I/O thread and hand
> back a shmem handle without having to round-trip to the main thread.
This would still require two context switches which is going to be slower. Who knows whether it's enough to matter though.
Comment 3•10 years ago
|
||
I really doubt that it will matter. Shared memory allocation itself involves at least one context switch, and we don't do it in really tight loops.
Reporter | ||
Comment 4•10 years ago
|
||
It sounded like george was going to do this.
Assignee: nobody → gwright
Assignee | ||
Comment 5•10 years ago
|
||
Been talking a bit with billm about this, and he's going to have a think about what might be a workable solution here. I'll continue digging.
Flags: needinfo?(wmccloskey)
Assignee | ||
Comment 6•10 years ago
|
||
It looks like we probably won't need this as Brad has come up with a solution which doesn't require modifying the existing IPC mechanisms. I think his approach makes sense for now as it works and is non-invasive, but we may want to readdress this at some point.
I think we can close this since bug 1161166 takes care of it.
Flags: needinfo?(wmccloskey)
Comment 8•7 years ago
|
||
per comment 7
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•