# OCaml Reviewing Ideas
###### tags: `OCaml5.0`
## Context
Tarides has contributed significant amount of new code to OCaml with the Multicore OCaml project. While Tarides continues to develop and maintain this code, we have also gained significant expertise on several parts of the OCaml compiler. Not just on the code that we contributed.
Recently, the OCaml compiler core team announced that they are facing a [maintenance bottleneck](https://discuss.ocaml.org/t/maintenance-bottlenecks-in-the-compiler-distribution/11045). Given that our engineers have lots of expertise in many parts of the compiler, we encourage our engineers to spend up to 20% of their time with general OCaml maintenance. This can include reviewing PRs, triaging issues, improving documentation, etc.
Below is a curated list of issues that we (KC, David, Jon, Jan) think Tarides has the expertise to work on. This list will be kept updated with reviewing ideas. If you pick one of these items, add your name to the item so that the work isn't duplicated. Some work does require multiple eyes, and use this note as a way to sync with others. Please report any OCaml maintenance work under the KR "Comp65: General maintenance of OCaml".
If you want to propose to add an item, please ping one of us (KC, David, Jon, Jan) on #multicore-dev. This is just to ensure we can prioritise and only work on items that are relevant to the expertise in the teams.
-- KC, David, Jon, Jan
## Stack
(Newer items are added to the top)
### 11/07/23
* Performance improvements for sequential code running on OCaml 5
* Easycrypt: https://github.com/EasyCrypt/easycrypt/issues/390
* Frama-C: https://github.com/ocaml/ocaml/issues/11662
* Frama-C: https://github.com/ocaml/ocaml/issues/11733
* Pyre: https://github.com/ocaml/ocaml/issues/11913
* Infer: https://discuss.ocaml.org/t/ocaml-5-gc-releasing-memory-back-to-the-os/11293/16
### 02/06/23
* Power support for OCaml 5!! --https://github.com/ocaml/ocaml/pull/12276
+ Last of the tier 1 supported architectures. Still the fastest cores that you can buy. We have a 192 3+ Ghz core behemoth on which we can run OCaml once this PR is merged.
* Macros to describe layout of OCaml stacks -- https://github.com/ocaml/ocaml/pull/12275
+ Simple addition. KC has had a look. Fabrice may be having a look too.
* Refactor the computation of stack frame parameters -- https://github.com/ocaml/ocaml/pull/12242
+ One more for the backend experts. This is more extensive and more eyes the better.
* Compaction -- https://github.com/ocaml/ocaml/pull/12193
+ From our team but our own reviews also matter here. This is a blocker for Meta and JS to switch to OCaml 5. Please review, even if it is only bits and pieces.
* Async signals work (from gadmm) -- https://github.com/ocaml/ocaml/pull/11307
+ Difficult one to review, but gains are high since it fixes a bug with eio https://github.com/ocaml/ocaml/issues/12253
* domain_create: deliver an Out_of_memory exception if malloc fails -- https://github.com/ocaml/ocaml/pull/12268
+ Easy one to review.
### 04/04/23
### 28/02/23
* Fix idle domain gc: https://github.com/ocaml/ocaml/pull/11903
+ We have severe performance regressions when a domain is idle. This is due to the fact that major GC speed is calculated per domain and the idle domain is very infrequent to perform its own domain local slices. This PR aims to fix that.
* OOM with idle domain: https://github.com/ocaml/ocaml/issues/12042
+ This one is related to #11903. But it turns out that even with #11903, which aims to fix idle domain GC, the problem is still there.
* Domain.DLS: document that creating a high number of DLS keys may not be a good idea: https://github.com/ocaml/ocaml/issues/11920
+ Documentation work. But a good one if you are keen to understand how things work and have a penchant for good docs.
* Restoring the unloadable runtime / memory clean-up at exit code (`OCAMLRUNPARAM=c=1`): https://github.com/ocaml/ocaml/issues/10865
+ Restoration of a 4.x feature broken by the multicore merge
+ Good PR for exploring the memory subsystem parts of the C runtime
+ Previously, the other-configs job on Inria's CI tested this
### Added earlier
* Mention in Gc documentation that compaction is currently not implemented: https://github.com/ocaml/ocaml/pull/11816
* Let's push this through to completion. Perhaps others can help review.
* Simplifications and fixes to multicore systhreads implementation: https://github.com/ocaml/ocaml/pull/11386
* This is pretty old. First, we should look at aim of the PR is still relevant.
* Atomic.modify, Atomic.modify_get: https://github.com/ocaml/ocaml/pull/10798
* This is interesting and useful. Perhaps Vesa?
### Taken
* Ephemerons and weak references performance: https://github.com/ocaml-bench/sandmark/pull/442#issuecomment-1447991017
* @fabbing, ...
* More volatile casts might be needed for OCaml 5.0: https://github.com/ocaml/ocaml/issues/11426
* This is for someone who understands the C memory model a bit and wants to get into the rabbit hole of cross-language memory models. But the actual task is more of an audit and simple fixes.
* @OlivierNicole, …
### Completed
* GC alarm leads to non-termination if the callback causes a major GC: https://github.com/ocaml/ocaml/issues/12002
* @fabbing
* Random failure in `intext_par.ml`: https://github.com/ocaml/ocaml/issues/12056
+ This seems to only happen in the CI. It would be useful to first recreate the failure locally.
* Finaliser called before value is unreachable: https://github.com/ocaml/ocaml/issues/11995
* @engil, @kayceesrk
* Crash on parallel usage of Weak Hash Set: https://github.com/ocaml/ocaml/issues/11934
+ @engil has self-assigned this. If you like to understand how to debug these sort of issues, please talk to @engil. He has a number of tricks for parallel debugging, all of which are not written down.
+ @NickBarnes has a fix
* Big array does not free memory in OCaml 5: https://github.com/ocaml/ocaml/issues/12161
+ covered by https://github.com/ocaml/ocaml/issues/10865 - to be done by us