Mozilla 2/Memory: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(link up OOM tracking bug)
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 2: Line 2:


* bsmedberg, jasone
* bsmedberg, jasone
* dmandelin (for rewriting)
* (stuart, jorendorff)
* (stuart, jorendorff)


= Status =
= Status =


Design and implementation have begun.
There are two tracks.


OOM tracking: {{bug|427099}}
Track 1 - Out of memory (OOM) handling - Underway.  This is being managed in Bugzilla.  See tracking {{bug|427099}}.
 
Track 2 - Garbage collection based on jemalloc - Design stage.


= Overview and Motivations =
= Overview and Motivations =


Track 1:
* Simplify the Mozilla codebase and avoid untested error paths by assuming that most allocations do not fail.
* Simplify the Mozilla codebase and avoid untested error paths by assuming that most allocations do not fail.
* add garbage collection support to jemalloc to support [[XPCOMGC]].
* Design and test fallback mechanisms at OOM or close-to-OOM for freeing caches, closing tabs, etc.  See [[Mozilla_2/Memory/OOM_API]] for the API design.
* Design and test fallback mechanisms at OOM or close-to-OOM for freeing caches, closing tabs, etc
 
Track 2:
* Add garbage collection support to jemalloc to support [[XPCOMGC]].


= Risks and Assumptions =
= Risks and Assumptions =
Line 22: Line 28:
== Schedule and Milestones ==
== Schedule and Milestones ==


Track I:
Track 1 - '''See {{bug|427099}} and its Depends On list.'''  See also OOM handling meeting notes: [[Mozilla 2/StatusMeetings/2008-02-06]]
* Provide an alternate malloc_can_fail API - easy
* Make large allocations use the alternate API - need analysis?
* Automatic rewriting to remove unnecessary OOM checks - dmandelin?
 
Track II:
* Add GC API support to jemalloc - need date estimate
 
== References ==
 
* Initial discussion of APIs needed for garbage collection is ongoing at [[GC_API]].
* OOM handling meeting notes: [[Mozilla 2/StatusMeetings/2008-02-06]]


Note that this is not a blocker for XPCOMGC work, because MMgc works now; it's just likely that our memory usage will be much better with a jemalloc backend.
Track 2 - No date estimate yet.  Initial discussion of APIs needed for garbage collection is ongoing at [[GC_API]].  Note that this is not a blocker for XPCOMGC work, because MMgc works now; it's just likely that our memory usage and perf will be much better with a jemalloc backend.

Latest revision as of 16:37, 27 June 2008

Owners

  • bsmedberg, jasone
  • dmandelin (for rewriting)
  • (stuart, jorendorff)

Status

There are two tracks.

Track 1 - Out of memory (OOM) handling - Underway. This is being managed in Bugzilla. See tracking bug 427099.

Track 2 - Garbage collection based on jemalloc - Design stage.

Overview and Motivations

Track 1:

  • Simplify the Mozilla codebase and avoid untested error paths by assuming that most allocations do not fail.
  • Design and test fallback mechanisms at OOM or close-to-OOM for freeing caches, closing tabs, etc. See Mozilla_2/Memory/OOM_API for the API design.

Track 2:

  • Add garbage collection support to jemalloc to support XPCOMGC.

Risks and Assumptions

Risks are that we actually will hit OOM and abort, mainly on small devices.

Schedule and Milestones

Track 1 - See bug 427099 and its Depends On list. See also OOM handling meeting notes: Mozilla 2/StatusMeetings/2008-02-06

Track 2 - No date estimate yet. Initial discussion of APIs needed for garbage collection is ongoing at GC_API. Note that this is not a blocker for XPCOMGC work, because MMgc works now; it's just likely that our memory usage and perf will be much better with a jemalloc backend.