Closed Bug 1875304 Opened 1 year ago Closed 1 year ago

Enable parallel marking on workers

Categories

(Core :: JavaScript: GC, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
125 Branch
Tracking Status
firefox125 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Currently this is restricted to the main runtime, but workers would benefit too.

We need to ensure that we only use it when there are enough helper threads available to avoid regressing performance when multiple runtimes are trying to collect at the same time.

Severity: -- → N/A
Priority: -- → P2
Depends on: 1878853

This adds a per-process count of helper threads 'reserved' for parallel
marking. This means reserved with respect to parallel marking but not anything
else, so helper threads can still be used for other tasks (including GC
parallel tasks) but the number of runtimes that can mark in parallel is
limited.

The main runtime reserves threads when parallel marking is enabled to
priviledge it over worker runtimes. Workers reserve threads only for the
duration of collection. Failure to reserve threads means parallel marking is
not used.

I don't love the term 'reserved' beacuse it implies the threads cannot be used
for anything else, but I couldn't think of anything better. I've added comments
to describe what it actually means.

The try build seems to be working : https://share.firefox.dev/42AK3W3.
Not sure what you will make of this profile: https://share.firefox.dev/42CSRul

(In reply to Mayank Bansal from comment #2)
It looks like that worker is continually collecting. Probably the same issue as bug 1873235.

Pushed by jcoppeard@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5aa7282094ee Enable parallel marking on workers r=sfink
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: