Closed Bug 1836948 Opened 6 months ago Closed 3 months ago

Prototype making the main thread part of the rayon thread pool.

Categories

(Core :: CSS Parsing and Computation, task)

task

Tracking

()

RESOLVED FIXED

People

(Reporter: emilio, Assigned: emilio)

References

(Blocks 1 open bug)

Details

Attachments

(5 files, 5 obsolete files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
324.77 KB, image/png
Details
236.13 KB, image/png
Details
48 bytes, text/x-phabricator-request
Details | Review
No description provided.

Depends on D179492

Depends on D179492

Attachment #9337650 - Attachment is obsolete: true
Attachment #9337651 - Attachment is obsolete: true
Attachment #9337652 - Attachment is obsolete: true
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a157866c741c
Update rayon-core. r=glandium,supply-chain-reviewers
Keywords: leave-open

Jeff, if it's not too much work, could you get a visualization like the one you posted in https://github.com/rayon-rs/rayon/issues/1052 but with the patches? (I haven't used the android GPU profiler thing). If you can't let me know and I can give it a shot.

Flags: needinfo?(jmuizelaar)

I'll get the visualization

Flags: needinfo?(jmuizelaar)
Attached image scheduling-try.png

This is with the patches applied.

The little cores are completely swamped with other work. During this time the style threads spend a lot of time waiting to be scheduled and it seems the main thread runs out of work to do. It then goes idle and gets clocked down while waiting for the style thread 4 to get scheduled.

Here's a version with layout.css.stylo-local-work-queue.in-main-thread=128 and layout.css.stylo-threads=4. With it we still do some sleeping on the main thread but we do also manage to do quite a bit of style work in parallel. We don't seem to sleep long enough for the big core to clock down.

Blocks: 1838200
Blocks: 1839620

This applies https://github.com/rayon-rs/rayon/pull/1063 to our
rayon-core. I'm hopeful it can be merged upstream soon, but meanwhile
this seems worth having on its ow.

Attachment #9337657 - Attachment is obsolete: true
Attachment #9337654 - Attachment is obsolete: true
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b98bce55d272
Patch rayon-core with proposed use_current_thread API. r=smaug,jnicol,supply-chain-reviewers
https://hg.mozilla.org/integration/autoland/rev/d7f697ba002a
Use the main thread as part of the style thread pool. r=smaug
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.