Closed Bug 1704617 Opened 4 years ago Closed 4 years ago

Add another threadType for wasm tier1/tier2 compile task

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
89 Branch
Tracking Status
firefox89 --- fixed

People

(Reporter: allstars.chh, Assigned: allstars.chh)

References

Details

Attachments

(1 file)

Right now wasm tier1 and tiew2 compile task share the same thread type: THREAD_TYPE_WASM.
However, they have different priorities when being executed,
https://searchfox.org/mozilla-central/rev/d9f6cded535d202a9ade4a530e653e659bcb5bbd/js/src/vm/HelperThreads.cpp#2656
https://searchfox.org/mozilla-central/rev/d9f6cded535d202a9ade4a530e653e659bcb5bbd/js/src/vm/HelperThreads.cpp#2661

When we dispatch these tasks to the external thread pool (TaskController), we need a way to know either it's from tier1 or tier2 compile task, so we can apply different priorities on them.
I'll add another thread type for this.

Presumably I'll use
THREAD_TYPE_WASM_COMPILE_TIER1,
THREAD_TYPE_WASM_COMPILE_TIER2,
and
rename THREAD_TYPE_WASM_TIER2 to THREAD_TYPE_WASM_GENERATOR_TIER2.

Looking forward to seeing the results of this, the current "priority" setup has some ugly side effects, see bug 1429953. To do better, we probably need more threads than cores, and a real priority scheme with proper preemption.

Add THREAD_TYPE_WASM_COMPILE_TIER1, THREAD_TYPE_WASM_COMPILE_TIER2 for
tier1/tier2 compile task respectively.

Rename THREAD_TYPE_WASM_TIER2 to THREAD_TYPE_WASM_GENERATOR_TIER2.

Pushed by allstars.chh@gmail.com: https://hg.mozilla.org/integration/autoland/rev/84fc74d0dbb8 Add another threadType for wasm compile task. r=lth
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: