Make the GC parallel task limit per-runtime not per-process
Categories
(Core :: JavaScript: GC, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox124 | --- | fixed |
People
(Reporter: jonco, Assigned: jonco)
References
Details
Attachments
(1 file)
Currently there's a per-process limit to the number of GC parallel tasks that we run at once. This is set to half the number of helper threads by default (e.g. there might be 8 helper threads and a limit of 4 GC parallel tasks).
This could be a problem for parallel marking in workers since a worker runtime could block the main thread runtime from making progress by dispatching a large number of tasks that tie up the helper thread system for a while.
To help with this we can move this limit to the runtime. This reduces the impact runtimes can have on each other and makes them more independent, although it does not fix the problem entirely.
Updated•1 year ago
|
Assignee | ||
Comment 1•1 year ago
|
||
Currently there is a per-process task limit to the number of GC parallel tasks
that can run at once (different and usually smaller that the total number of
helper thread tasks that can run). If multiple runtimes are collecting they can
starve each other of tasks even when there are helper threads spare.
This moves the limit from per-process to per-runtime and allows us to run as
many GC parallel tasks in total as there are helper threads.
A new state is added for GC parallel tasks to indicate they are queued on the
runtime before they have been dispatched to the helper thread system.
Comment 3•1 year ago
|
||
bugherder |
Description
•