Closed Bug 2004011 Opened 11 months ago Closed 6 months ago

Consider using per-zone chunks to allocate GC arenas

Categories

(Core :: JavaScript: GC, task, P3)

task

Tracking

()

RESOLVED FIXED
152 Branch
Tracking Status
firefox152 --- disabled
firefox153 --- fixed

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.

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.

Blocks: 1942331
Assignee: nobody → jcoppeard

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.

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.

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.

We don't need the zone pointer in the arena header any more so we can remove
it. This marginally improves our heap density.

Pushed by asilaghi@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/0a769254d48b https://hg.mozilla.org/integration/autoland/rev/46cac6f150ff Revert "Bug 2004011 - Part 3: Remove zone pointer from arena r=sfink" for causing mochitests failures at toolkit/components/aboutmemory

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

Flags: needinfo?(jcoppeard)
Flags: needinfo?(jcoppeard)
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 152 Branch
Regressions: 2038580
Regressions: 2039789
Regressions: 2040313
Regressions: 2040320
Regressions: 2040329
Regressions: 2040951

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?

Flags: needinfo?(jcoppeard)

Yes I'd be happy with that.

Flags: needinfo?(jcoppeard)
Regressions: 2041659
Regressions: 2046916
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: