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

Add optional argument to neglect domain_local_await #4

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

polytypic
Copy link
Collaborator

By default, the benchmark framework replaces the blocking operations provided by domain-local-await, that use Mutex and Condition by default, with a busy-wait based implementation. The reason for that is that suspending and later resuming a domain using a mutex and condition can be extremely expensive. The cost can be 100μs or 100kns on the "fermat" machine we currently use for benchmarking multicore code, for example, which is 2 to 3 orders of magnitude more than what typical lock-free operations take. So, when that happens in a benchmark, you are no longer measuring the lock-free algorithm and you are measuring the OS and OCaml runtime context switch cost. The result will then be basically just noise. Reconfiguring DLA allows to measure the cost it takes to support blocking rather than the cost of blocking itself.

@polytypic polytypic force-pushed the add-optional-arg-to-neglect-dla branch from 860f4a6 to a9c3a6f Compare February 7, 2024 09:36
@polytypic polytypic merged commit ee9c11c into main Feb 7, 2024
2 of 3 checks passed
@polytypic polytypic deleted the add-optional-arg-to-neglect-dla branch February 7, 2024 09:40
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

Successfully merging this pull request may close these issues.

None yet

1 participant