Open
Bug 1346927
Opened 8 years ago
Updated 2 years ago
Replace PVRManager::GetSensorState with lock-free shared memory structure (Eliminating message queue IPC)
Categories
(Core :: WebVR, enhancement)
Core
WebVR
Tracking
()
NEW
Performance Impact | low |
People
(Reporter: kip, Unassigned)
References
Details
(Keywords: perf)
Attachments
(1 file)
A lock-free structure in shared memory is more efficient than an IPC message queue, will help reduce latency, and will eliminate the sync IPC message in support of Bug 1344216.
Reporter | ||
Updated•8 years ago
|
Updated•8 years ago
|
Whiteboard: [qf:p3]
Reporter | ||
Comment 1•8 years ago
|
||
For some background on the lock-free approach, see "Concurrent reading and writing" by Leslie Lamport:
http://dl.acm.org/citation.cfm?doid=359863.359878
This is applicable to VR headset state, such as positional tracking data, as it is updated by a single thread while being read by multiple threads. Concurrent writing by multiple threads is not necessary.
Reporter | ||
Comment 2•8 years ago
|
||
(In reply to :kip (Kearwood Gilbert) from comment #1)
> For some background on the lock-free approach, see "Concurrent reading and
> writing" by Leslie Lamport:
>
> http://dl.acm.org/citation.cfm?doid=359863.359878
>
> This is applicable to VR headset state, such as positional tracking data, as
> it is updated by a single thread while being read by multiple threads.
> Concurrent writing by multiple threads is not necessary.
Specifically, I would apply the "General Readers/Writer Solution" for this application.
Reporter | ||
Comment 3•8 years ago
|
||
We will also need to ensure that the solution is tolerant of preemption and does not result in crashing the content process if the GPU process is killed.
Reporter | ||
Comment 4•8 years ago
|
||
(In reply to :kip (Kearwood Gilbert) from comment #3)
> We will also need to ensure that the solution is tolerant of preemption and
> does not result in crashing the content process if the GPU process is killed.
Pre-emption effects can be avoided by limiting the number of iterations attempting to get a new headset state in the reader. When a valid state is read, it will be copied to the reader's non-shared memory. In the event of the writer being pre-empted for an extended duration of time, the reader should fall back to the prior recorded sensor states.
Reporter | ||
Comment 5•8 years ago
|
||
Comment 6•7 years ago
|
||
Kip, have you taken a look at, https://dxr.mozilla.org/mozilla-central/rev/0b255199db9d6a6f189b89b7906f99155bde3726/ipc/glue/SharedMemory.h? Could it have any help for us?
Reporter | ||
Comment 7•7 years ago
|
||
(In reply to Daosheng Mu[:daoshengmu] from comment #6)
> Kip, have you taken a look at,
> https://dxr.mozilla.org/mozilla-central/rev/
> 0b255199db9d6a6f189b89b7906f99155bde3726/ipc/glue/SharedMemory.h? Could it
> have any help for us?
Yes, I think me may be able to use this class in our implementation. It's nice to have some platform abstraction
Reporter | ||
Updated•7 years ago
|
Summary: Replace PVRManager::GetSensorState with lock-free shared memory structure (Eliminating sync IPC) → Replace PVRManager::GetSensorState with lock-free shared memory structure (Eliminating message queue IPC)
Updated•3 years ago
|
Performance Impact: --- → P3
Whiteboard: [qf:p3]
Comment 8•3 years ago
|
||
The bug assignee didn't login in Bugzilla in the last 7 months.
:jimm, could you have a look please?
For more information, please visit auto_nag documentation.
Assignee: kearwood → nobody
Flags: needinfo?(jmathies)
Updated•2 years ago
|
Flags: needinfo?(jmathies)
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•