Consider using per-zone chunks to allocate GC arenas
Categories
(Core :: JavaScript: GC, task, P3)
Tracking
()
People
(Reporter: jonco, Assigned: jonco)
References
(Blocks 1 open bug)
Details
Attachments
(3 external files)
Currently the chunks used for arenas are shared between all zones. This reduces the total virtual memory required and total overhead due to per-chunk data structures.
Now that fission will soon be enabled on all platforms the number of zones will be much lower and we can think about making chunks per-zone instead. This is simpler and enables us to clear the mark bits faster at the start of GC.
Comment 1•11 months ago
|
||
I've seen a lot of dTLB-load-misses for unmarking (bug 1942331) so it'd be great if this would let us avoid that.
| Assignee | ||
Updated•6 months ago
|
| Assignee | ||
Comment 2•6 months ago
|
||
This will increase virtual memory use. That won't be a problem on 64 bit platforms but might show up 32 bit platforms if they use a lot of zones. This is less likely to be an issue now we support fission everywhere.
| Assignee | ||
Comment 3•6 months ago
|
||
Available and full chunk pools and the the current chunk move from the
GCRuntime to the Zone. The runtime continues to own the empty chunk pool.
| Assignee | ||
Comment 4•6 months ago
|
||
This improves unmarking because we can clear a whole chunk of mark bits at
once.
There is some subtlety however because the mutator may move these chunks
between the various lists while we are doing this. This can only happen in one
direction however: available chunks -> current chunk -> full chunks. With this
in mind we can handle updates by the mutator.
| Assignee | ||
Comment 5•6 months ago
|
||
We don't need the zone pointer in the arena header any more so we can remove
it. This marginally improves our heap density.
Comment 8•6 months ago
|
||
Backed out for causing mochitests failures at toolkit/components/aboutmemory
Backout Link
Push with failures
Failure Log
Failure line TEST-UNEXPECTED-FAIL | toolkit/components/aboutmemory/tests/test_aboutmemory5.xhtml | assertion count 33 is more than expected 0 assertions
| Assignee | ||
Updated•6 months ago
|
Comment 10•6 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/ba5921e18dd5
https://hg.mozilla.org/mozilla-central/rev/7d5d13500a0e
https://hg.mozilla.org/mozilla-central/rev/22d0beae1255
Comment 11•6 months ago
|
||
Would it make sense to revert this change from Beta 152 given the number of perf regressions it caused so the investigation can continue without the concern of an upcoming release?
Comment 13•6 months ago
|
||
Reverted for 152.0b2 for causing various perf regressions.
https://github.com/mozilla-firefox/firefox/commit/c6e3b875fd632bb1ddeeade88b797a0afa6e738e
Comment 14•6 months ago
|
||
| uplift | ||
Description
•