Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fast-jit performance issue #2499

Open
yamt opened this issue Aug 23, 2023 · 0 comments
Open

fast-jit performance issue #2499

yamt opened this issue Aug 23, 2023 · 0 comments

Comments

@yamt
Copy link
Collaborator

yamt commented Aug 23, 2023

consider fast-jit with WASM_ENABLE_LAZY_JIT.
background compiler threads (orcjit_thread_callback) hold fast_jit_thread_locks most of the time until they finish their work.
on-demand compilation (compile_fast_jit_and_then_call) needs to compete with the corresponding background thread and win the race to make a progress.
depending on the mutex implementation and thread scheduling, the on-demand compilation can be starved.

possible solutions:
a. retire the background threads
b. make the lock finer grain (eg. per target function)
c. implement a fair lock and use it instead of the os mutex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant