Closed Bug 1360502 Opened 3 years ago Closed 3 years ago
Prioritise running GC tasks on helper threads
Jan, I seem to remember you brought this up a while ago. The current helper thread setup makes GC parallel tasks the lowest priority and will schedule any other kind of task before them. This could lead to helper thread tasks from one runtime delaying GC tasks for another runtime and causing user-visible pauses. We really want the GC tasks to get executed as soon as possible.
Perhaps beyond the scope of this bug, but if helper thread scheduling is an issue, perhaps we should consider budgeting background GC tasks similar to how we budget them on the foreground. I imagine delaying a JIT compilation for a few milliseconds isn't necessarily a big deal, but if we hold it up for too long it could be an issue. Of course, that's assuming there can be enough background GC tasks to block all threads in the pool - and I don't know how easy or hard it would be to incrementalize these tasks.
(In reply to Emanuel Hoogeveen [:ehoogeveen] from comment #1) > Of course, that's assuming there can be enough background GC tasks to block > all threads in the pool When we start sweeping a group of zones we fire of lots of GC parallel tasks for sweeping the various tables. There are more than enough to use all threads in the pool. Incrementalising these tasks is something we are going to look at, but for now the easiest way forward is to make the parallel execution work.
Patch to test for GC tasks first.
Attachment #8862817 - Flags: review?(jdemooij)
Comment on attachment 8862817 [details] [diff] [review] bug1360502-prioritise-gc-tasks Review of attachment 8862817 [details] [diff] [review]: ----------------------------------------------------------------- Makes sense.
Attachment #8862817 - Flags: review?(jdemooij) → review+
Pushed by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/af0598e94338 Prioritise GC parallel tasks when selecting tasks to run on helper threads r=jandem
You need to log in before you can comment on or make changes to this bug.