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

Outperform the way to consume tasks by domains #41

Merged
merged 2 commits into from
Sep 21, 2024
Merged

Outperform the way to consume tasks by domains #41

merged 2 commits into from
Sep 21, 2024

Conversation

dinosaure
Copy link
Contributor

No description provided.

…mains) only

when it's needed.

On benchmarks, the mutex (system) has a huge cost. This patch add a new atomic
into the pool to set to false when the shared queue is not empty. In this case,
all domains fallback to the worker function to consume all pending tasks
available into the shared queue. Otherwise, domains just consume their own
internal queues until they are empty.

We keep the behavior that when something appears into the shared queue, domains
(all domains) introspects this shared queue in the exclusive way (via the
mutex). The test30 shows the case of a cancellation across domains and where one
of our domains should consume this task from the shared queue and do, as soon as
possible, the cancellation.
@dinosaure dinosaure merged commit e10c048 into main Sep 21, 2024
1 check failed
@dinosaure dinosaure deleted the hot-loop branch September 21, 2024 16:26
dinosaure added a commit to dinosaure/opam-repository that referenced this pull request Jan 13, 2025
CHANGES:

- Notice the domain if it needs to look into the shared heap if a task is ready
  to be transfered (@dinosaure, robur-coop/miou#41)
- Don't use `Option.value` but `match .. with` to calculate the optional length
  for `Miou_unix.{read,write}` (@kit-ty-kate, robur-coop/miou#44)
- Use `List.iter` instead of `Hashtbl.iter` for internal kept file-descriptors
  of `Miou_unix` (@dinosaure, robur-coop/miou#45)
- Improve the documentation of `Miou_unix` about suspended syscalls (@dinosaure,
  @kit-ty-kate, robur-coop/miou#43)
- Export `reraise` (@dinosaure, robur-coop/miou#46)
- Fix an issue on the `dom0` and observe if some tasks must be transfered to it
  (@dinosaure, robur-coop/miou#48)
- Fix documentation (@mbarbin, robur-coop/miou#47)
- Fix the formatter (@mbarbin, robur-coop/miou#51)
- Upgrade miou to `ocamlformat.0.27.0` (@mbarbin, robur-coop/miou#52)
- Add `x-maintenance-intent` (@hannesm, robur-coop/miou#56)
- Improve the documentation and some `odoc` warnings (@mbarbin, robur-coop/miou#53, robur-coop/miou#54)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant