Closed
Bug 594878
Opened 14 years ago
Closed 14 years ago
Use /dev/ashmem for Shmem on android
Categories
(Core :: IPC, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: cjones, Assigned: cjones)
References
Details
Attachments
(2 files)
5.89 KB,
patch
|
joe
:
review+
|
Details | Diff | Splinter Review |
10.73 KB,
patch
|
mwu
:
review+
|
Details | Diff | Splinter Review |
android has decided not to support SysV shmem (OK) or POSIX shmem slash /dev/shm (sigh), and instead created two new shmem implementations in their kernel. One is /dev/ashmem, which is non-physically-contiguous shmem that can be thrown out at any time when there's memory pressure (that is, just like /dev/shm except the throw-out-at-arbitrary-times bit). It appears that mappings can be pinned, but I'm not sure that's a game we want to play. The other is /dev/pmem, which allocates physically contiguous regions that can't be thrown out. We don't want to touch that except for something like a video decoder.
The current android shmem implementation is mapping real files, and it's slow. This bug covers getting us to use /dev/ashmem. We'll need to gracefully deal with mappings being tossed out behind our back, but that's (probably) post-b1 work for a followup.
Assignee | ||
Comment 2•14 years ago
|
||
FTR, I used http://gitout.omapzoom.com/?p=kernel/common.git;a=commitdiff_plain;h=1cf25a181bf85c16a030374e6256fb078ba70ba6 to write the v0 patch. Will be posting a cleaner v1 later today.
Assignee | ||
Comment 3•14 years ago
|
||
Assignee: nobody → jones.chris.g
Attachment #473895 -
Flags: review?(joe)
Comment 4•14 years ago
|
||
Comment on attachment 473895 [details] [diff] [review]
part 1: Factor out chromium-implemented SharedMemoryBasic in preparation for an android-specific impl
Nothing objectionable in here!
Attachment #473895 -
Flags: review?(joe) → review+
Assignee | ||
Comment 5•14 years ago
|
||
Attachment #473935 -
Flags: review?(mwu)
Comment 6•14 years ago
|
||
Comment on attachment 473935 [details] [diff] [review]
part 2: Add a SharedMemoryBasic impl that uses /dev/ashmem on android
How about __android_log_print for logging? strerr isn't too useful on android most of the time unless you're redirecting it to a file. See http://hg.mozilla.org/mozilla-central/file/8e2027140923/widget/src/android/AndroidJavaWrappers.h#l53 for an example.
Attachment #473935 -
Flags: review?(mwu) → review+
Assignee | ||
Comment 7•14 years ago
|
||
Done.
Assignee | ||
Comment 8•14 years ago
|
||
http://hg.mozilla.org/projects/cedar/rev/043bef95ecd0
http://hg.mozilla.org/projects/cedar/rev/888afabb303c
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
tracking-fennec: ? → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•