Welcome to the February 2022 Multicore OCaml monthly report! As with previous updates, these have been compiled by me, @ctk21, @kayceesrk and @shakthimaan.
Progress towards a stable OCaml 5.0.0 release have been moving forward at full steam, with most of the multicore OCaml work now happening directly within the main ocaml/ocaml repository. As a number of deprecations have happened in OCaml 5.0+trunk, it can be a little tricky in the immediate term to get a working development environment. You may find these resources helpful:
- There is a multicore monorepo which is a âfast clone and dune buildâ with a number of ecosystem libraries. (thanks @patricoferris)
- There is an alpha-opam-repository which contains work-in-progress packages. If a package you maintain is in there, now would be a good time to start releasing it to the mainline opam-repository. Remember that while we can propose changes, only the community maintainers of the relevant projects can do the actual release, so your help with making OCaml 5.0-compatible releases of your projects would be very much appreciated. (thanks @kit-ty-kate)
For mainline development, the compiler development newsletter has an overview of whatâs been happening in the compiler. From a multicore perspective:
- the ARM64 PR has been merged, so your shiny Mac M1s will now work
- we continue to work on the post-Multicore merge tasks for an upcoming 5.0.0+trunk release. The documentation efforts on the OCaml memory model, runtime system, and STW synchronization have also started.
- The eio project is actively being developed which now includes UDP support with Eioâs networking interface. There has been robust discussion on several aspects of eio which is all influencing the next iteration of its design (thank you to everyone!). For those of you who do not wish to participate in public discussion, feel free to get in touch with me or @kayceesrk for a private discussion, particularly if you have a large OCaml codebase and opinions on concurrency. Weâll summarise all these discussions as best we can over the coming months.
-
Sandmark-nightlyandSandmarkhave a custom variant support feature to build trunk, developer branches, or a specific commit to assess any performance regressions. The backend tooling with UI enhancements continue to drive thecurrent-benchproject forward.
As always, the Multicore OCaml updates are listed first, which are then followed by the ecosystem tooling updates. Finally, the sandmark, sandmark-nightly and current-bench project tasks are mentioned for your reference.
Multicore OCaml
Open
Discussion
-
ocaml-multicore/ocaml-multicore#750
Discussing the design of Lazy under MulticoreA continuing design discussion of Lazy under Multicore OCaml that
involves sequential Lazy, concurrency problems, duplicated
computations, and memory safety. -
ocaml/ocaml#10960
Auditstdlibfor mutable stateAn issue tracker to audit stdlib for mutable state, as the OCaml
5.00 stdlib implementation should be both memory and thread-safe. -
ocaml/ocaml#11013
Meta-issue for OCaml 5.0 release goalsAn issue tracker that contains a checklist for branching OCaml 5.0.
-
ocaml/ocaml#11073
Code comprehension: why donât STW sections keepall_domains_lockthe whole time?A discussion on the mutual-exclusion mechanism in STW sections where
race conditions on new domains are checked using a condition
variableall_domains_cond.
Build
-
ocaml/ocaml#10940
configure: C11 atomic support required for 5.00.0The
_Atomickeyword was introduced in GCC 4.9 and hense RHEL 7 and
its derivatives cannot build OCaml 5.0.0. RHEL 7 does not reach EOL
until 2024. This issue tracks the changes required to add support
for C11_Atomic. -
ocaml/ocaml#10989
Download GNU parallel directly from gitThe
tools/ci/appveyor/appveyor_build.shhas been updated to
download GNU parallel with Git. -
ocaml/ocaml#10991
Usezstdfor CI artifacts upload and downloadThe upload and download time of CI artifacts are improved with the
use ofzstdcompression. -
ocaml/ocaml#11007
Ship and install META filesA PR to keep up-to-date META files for the compiler libraries
(stdlib,compiler-libs,threads,unix,str,anddynlink)
and to install them alongside the compiler.
Bug
-
ocaml/ocaml#10773
[4.14] Type [> Cycle ]is not compatible withtype [> Cycle ]A
Type [> ``Cycle ]not compatible error reported when compiling
capnp-rpc.1.2.1with the 4.14 branch. -
ocaml/ocaml#10868
Fix off-by-1 bug when initializing frame hashtablesA PR for
runtime/frame_descriptors.cthat fixes on off-by-1 bug
when initializing frame hashtables. -
ocaml/ocaml#11040
ThreadSanitizerissuesAn issue tracker that contains list of
ThreadSanitizerruns from
tests/parallelexecution for troubleshooting race conditions. -
ocaml/ocaml#11061
dumpobjtool crashesA segmentation fault from
tools/dumpobjon a bytecode program has
been reported.
Enhancement
-
ocaml/ocaml#10925
Rename symbol forCaml_statetocaml_stateThe
Caml_statemacro will be renamed tocaml_stateto avoid a
name collision, but the change will not be backported to 4.14. -
ocaml/ocaml#10967
Add temp_dir function to create a temporary directoryThe addition of
Filename.temp_dirinstdlibis required by the
Tezos project to allow importing HTTP tar snapshots. -
ocaml/ocaml#10971
Means of limiting how much memory is being reserved by the runtime,
so that Valgrind and AFL can be usedThe suggestion is to set
max_domainsfromOCAMLRUNPARAMto
provide a good balance between usability and complexity in the
implementation. -
ocaml/ocaml#11054
Respect user provided maximum stack space value, and fix debug run oftmp/stack_space.mltestA PR that honors
OCAMLRUNPARAM=1for the initial stack size, and
ensures thattmc/stack_space.mlapplies stack restriction during
the running stage. -
ocaml/ocaml#11057
Implement quality treatment for asynchronous actions in multicoreThe
caml_process_pendingbehaviour has been reimplemented, and
there are code improvements to the asynchronous actions in the
Multicore runtime.
Documentation
-
ocaml/ocaml#10992
OCaml multicore memory model and C (runtime, FFI, VM)A draft documentation on the OCaml Multicore memory model and the
use of theFieldmacro. -
ocaml/ocaml#11058
runtime/HACKING.adoc: tips on debugging the runtimeThe
HACKING.adochas been updated with information on the runtime
system, and a newruntime/HACKING.adocfile has been created on
how to troubleshoot the same. -
ocaml/ocaml#11072
domain.c: document the STW synchronization codeA draft documentation on the STW synchronization code in
domain.c.
Testing
-
ocaml/ocaml#10953
ocamltest/summarize.awknot properly reporting abort failures on testsuite runsThe serializer needs to be thoroughly tested using
ocamltest. The
recommendation now is to use the strict minimum of code from the
standard library and the OCaml runtime to implement ocamltest. -
ocaml/ocaml#10980
GitHub Actions / ocamltest / testsuite / OCaml 5An issue tracker that contains a list of action items related to
ocamltest and OCaml 5. -
ocaml/ocaml#11016
lib-dynlink-private/test.mlfailing on the debug runtimeAn assertion failure from
lib-dynlink-private/test.mlhas been
found in thetest_cow_repeatedsegment during the tests. -
ocaml/ocaml#11055
runtime: introduceDebug_uninit_tmcinmisc.hAn assertion check in
runtime/memory.cwith the introduction of
Debug_uninit_tmcinmisc.h. -
ocaml/ocaml#11065
Restore basic functionality to the bytecode debuggerA draft PR to handle backtraces in the presence of fibers to restore
the basic functionality in the bytecode debugger.
Performance
-
ocaml/ocaml#10964
Ring-buffer based runtime tracing (eventring)Eventring is a runtime tracing system designed for continuous
monitoring of OCaml applications. There is not much difference with
this PR when running Sandmarkâs sequential benchmarks as illustrated
below:
-
ocaml/ocaml#11062
Bytecode compiler emits too many calls tocaml_ensure_stack_capacity, causing a slowdownThe bytecode compiler emits calls to
caml_ensure_stack_capacity
that causes a performance regression in Sandmark benchmarks. The
following illustration compares the byte code results between 4.13.1
and 5.0.0 (February 24, 2022).
Closed
Build
-
ocaml/ocaml#10760
Use GNU parallel for the CI testsuite runsUse
make parallelintools/ci/actions/runner.shto speed-up CI
test runs. -
ocaml/ocaml#10875
Use mmap(MAP_STACK|âŚ) for fibre stacks on OpenBSDAn option to allocate stacks with
mmap(MAP_STACK)instead of
malloc. This is available using a configure
--enable-mmap-map-stackoption. There is not much difference
between trunk or with mmap on/off on Linux as shown below:
-
ocaml/ocaml#10893
Remove configuration options--disable-force-safe-stringandDEFAULT_STRING=unsafeA PR that removes the deprecated
--disable-force-safe-stringand
DEFAULT_STRING=unsafecompiler options. -
ocaml/ocaml#10962
Ignore compatible--disableoptions in configureThe definitions of
NO_NAKED_POINTERSinm.hand
NAKED_POINTERS=falseinMakefile.config.inare retained for
compatibility, and the error for the--disableoption in the
configure script is ignored. -
ocaml/ocaml#11037
Assorted fixes found while restarting the Jenkins CIThe PR contains configure tweaks, updates to Jenkins scripts, test
suite fixes, and updates to the runtime system based on observations
in the Jenkins CI. -
ocaml/ocaml#11049
Normalize the version number of the compilerThe compiler version number is now
5.0.0. -
ocaml/ocaml#11063
Fix the opam file after #11049The
ocaml-variants.opamfile has been updated to use version
5.0.0+trunk.
Fix
-
ocaml/ocaml#10973
Remove unusedgc_regs_slotin domain_stateThe
gc_regs_slotis superseded bygc_regs_bucket, and the same
is thus removed. -
ocaml/ocaml#10994
[minor] fix multicore merge error inminor_gc.c:reallloc_generic_tableThe
realloc_generic_tableinruntime/minor_gc.chas been
restored with the correct parameters. -
ocaml/ocaml#11002
Do not useBegin_roots/End_rootsin runtimeThe
Begin_rootsandEnd_rootsare not to be used in the runtime,
and a deprecation warning has been added to these macros. -
ocaml/ocaml#11014
Cut polling of pending signals vector in bytecode interpreterThe polling using
caml_check_pending_signalsis removed in the
bytecode interpreter. Also,caml_check_pending_interruptis
removed in favour ofcaml_check_gc_interrupt. -
ocaml/ocaml#11039
Reintroducecaml_final_do_calls_exnThe
runtime/finalise.ccode has been updated based on the review
of asynchronous action handling in Multicore, and
caml_final_do_calls_exnhas been reintroduced. -
ocaml/ocaml#11046
minor bugfix in caml_reallocate_minor_heapA fix in the âdecommitâ logic of
caml_reallocate_minor_heap, and
the current minor heap layout has been documented. -
ocaml/ocaml#11051
Fix leftover TODO inruntime/startup_byt.cThe
Fatal error during unlock: Operation not permittederror is
now fixed inruntime/startup_byt.c. -
ocaml/ocaml#11053
MakeHd_vala relaxed atomic loadThe PR provides a fix for ThreadSanitizer issues.
Hd_valis no
longer an lvalue, and is moved to a relaxed atomic.
Documentation
-
ocaml/ocaml#11008
Document and refactor the gc-stats codeThe GC module provides two kinds of runtime statistics,
Heap Stats
andAllocation Stats, and the same has been documented in
runtime/caml/gc_stats.h. -
ocaml/ocaml#11038
Atomic: update documentation and add institutionThe
CamlInternalAtomicis removed since atomics are now primitive,
and documentation has been updated. -
ocaml/ocaml#11059
Documentation improvements for native stack switching functionsAdditional comments have been added in
fiber.hfor the native code
specification ofocaml_runstack,caml_perform,caml_reperform,
andcaml_resume. The data structures,struct stack_infoand
struct stack_handler, have also been documented.
Testing
-
ocaml/ocaml#10930
Downstream patch changes for removedStreamandPervasiveslibrary PR#10896The recommended patch changes for Sandmark dependencies that are
used to run parallel benchmarks for 5.00.0+trunk have been updated. -
ocaml/ocaml#11004
Memory model testsA new
testsuite/tests/memory-modelsub-directory has been created
for testing the memory model. -
ocaml/ocaml#11033
Fix testcallback/test_signalhandler.mlThe
.mlifiles intestsuite/tests/callbackhave been cleaned up,
andunix_killnow checks for signals. Amykillfunction that
does not allocate has been added to the test.
Enhancement
-
ocaml/ocaml#10462
Add [@poll error] attributeThe PR proposes an attribute to accompany the safepoints PR, which
will help developers of libraries having atomic sections to do so in
a less error prone way. -
ocaml/ocaml#10950
Allocate domain state usingmallocinstead ofmmapThe
mmapcalls are replaced bymallocto simplifyCaml_state
management. -
ocaml/ocaml#10965
Thread safety for all runtime hooksThe thread-safety of hooks and the restoration of the GC timing
hooks in Multicore have been merged. -
ocaml/ocaml#10966
Simplifications/cleanups/clarifications for Multicore reviewcaml_modifyhas been documented, the APIs for signals/actions have
been simplified, and dead code has been removed. -
ocaml/ocaml#10974
domain.c: Use an atomic counter for domain unique IDsThe use of a fixed
Max_domainssetting is removed to dynamically
configure the same during program execution. -
ocaml/ocaml#10977
Make<caml/sync.h>more abstract and refactor implementation of sync.cThe POSIX implementation of mutexes and condition variables in
<caml/sync.h>have been moved tosync_posix.h. The
<caml/sync.h>declares only the high-level, platform-agnostic
mutex and condition variable operations. -
ocaml/ocaml#10988
Provide a default definition ofcpu_relaxA default definition of
cpu_relaxhas been added to
runtime/caml/platform.h. -
ocaml/ocaml#11003
Adjustmmapalignment of minor heap spaceThe alignment for
mmapin the minor heap space has been adjusted
to usecaml_sys_pagesize. -
ocaml/ocaml#11010
Alternative approach to usingstrerror_rfor reentrant error string conversionThe
strerror_ris used for reentrant error string
conversion. Also, acaml_plat_fatal_errorerror reporting function
has been added toruntime/platform.c. -
ocaml/ocaml#11023
Careful minor heap clear in DEBUGThe
Debug_free_minoris used to clear the minor heap at the end of
a minor collection, and the transition fromDebug_free_minorto
Debug_uninit_minoris checked when usingAlloc_small. -
ocaml/ocaml#11031
With frame-pointers, exception handlers should restore RBPOn AMD64, the exception handlers should restore the
rbpregister
when using frame-pointers. -
ocaml/ocaml#11056
Minor improvements to ânamed valuesâ handlingThe result of
caml_named_value("Unix.Unix_error")is cached, and
the âdjb2â hash function is used for the table of named
values. Also, locking has been added tocaml_iterate_named_values.
Cleanup
-
ocaml/ocaml#10966
Simplifications/cleanups/clarifications from multicore reviewThe
caml_modifyis now documented, and a few public API have been
made private. The APIs for signals have been simplified, and dead
code has been removed. -
ocaml/ocaml#11001
Header cleanup:mlvalues.hincludedomain_state.honce & minimise cross-header includesThe
domain_state.hnow includesmlvalues.honce, and the PR
minimises cross-inclusion between headers. -
ocaml/ocaml#11019
Remove unncessaryCurrent_threadrestore incaml_thread_enter_blocking_sectionThe
caml_thread_enter_blocking_sectionfunction in
otherlibs/systhreads/st_stubs.chas been updated to remove the
unnecessary use ofCurrent_thread. -
ocaml/ocaml#11041
Minor cleanups in effect.mlThe PR remove code duplication in
Effect.Shallow. It also removes
Obj.magicand includes optimization toShallow.fiber.
Performance
-
ocaml/ocaml#10930
Downstream patch changes for removedStreamandPervasiveslibrary PR#10896The removal of
StreamandPervasiveslibrary required patch
updates to Sandmark dependency packages. -
ocaml/ocaml#10949
Atomic operations on arraysA new
Atomic.Arraymodule contains the atomic operations on
arrays, namely, atomic read, write, exchange, compare and set, and
fetch and add. A program that spawns four threads and performs
10,000 fetch-and-adds in an atomic array of integers was
benchmarked. The performance of random write accesses is illustrated
in the following figure: -
ocaml/ocaml#11000
Fix a minor regression from #10462The
check_local_inlineis added tolambda/translattribute.mlto
fix a minor regression related to safepoints. -
ocaml/ocaml#11047
gc stats: properly orphan allocation statsThe
orphan statsare stored in a globalstructure alloc_statsin
gc_stats.c, which is protected by a lock. On domain termination,
the stats of the current domain are added toorphan stats.
ARM64
-
ocaml/ocaml#10943
Introduce atomic loads in Cmm and Mach IRsThe
Patomic_loadprimitive is now enhanced to ease support for
other architectures. This is required for the ARM64 support. -
ocaml/ocaml#10972
ARM64 multicore supportThe PR for ARM64 Multicore OCaml has been merged. The
arm64.Sfile
has been updated, and the coverage tests for
testsuite/tests/effectsandtestsuite/tests/callbackrun fine.
Ecosystem
Eio
Open
-
ocaml-multicore/eio#190
Update tocmdliner.1.1.0A draft PR to update to
cmdline.1.1.0with changes to
lib_eio_linux/tests/eurcp.ml. -
ocaml-multicore/eio#196
Consider renamingFibre.forkThe
Fibre.forkname is not related toUnix.fork, and it does not
copy the calling environment. It needs to be renamed. Suggestions
includecreate,start, orspawn. -
ocaml-multicore/eio#205
Prepare releaseThe sources now depend on
uring.0.3andCHANGES.mdfile has been
updated to prepare for a release.
Completed
Build
-
ocaml-multicore/eio#167
Remove pin-depends on uringThe
pin-dependssection ineio_linux.opamfile has been removed. -
ocaml-multicore/eio#182
Add a dependency on OCamlAn explicit dependency mentioning
ocaml (>= 4.12.0)has been added
to thedune-projectandeio.opamfiles.
Fix
-
ocaml-multicore/eio#173
Buf_read.seqnow checks the stream hasnât moved onThe error detection for using a sequence twice, or when performing
other parsing operations first has been added. -
ocaml-multicore/eio#174
Remove âbrokenâ state from promisesA promise is now simply unresolved or resolved.
Promise.awaitdoes
not raise exceptions, andPromise.break,Promise.broken, and
await_resulthave been removed. -
ocaml-multicore/eio#176
Prevent Switch and Cancel from being mutated from other domainsA cancellation context across domains is not permitted, and
cancellation functions are allowed to assume that they are running
in their own domain. -
ocaml-multicore/eio#187
WSL: Unix.Unix_error on âHello, Worldâ exampleA
Unix.Unix_errorreported by @leviroth (Levi Roth) when running a
âHello, Worldâ example on Windows 11. The
PR#203 provides a
fix for the same. -
ocaml-multicore/eio#195
Rename Fibre to FiberThe upstream naming of
Fiberis used in the sources, and the old
name is marked as deprecated. -
ocaml-multicore/eio#201
Effect.effis nowEffect.tin trunkThe upstream change in trunk from
Effect.efftoEffect.thas
been incorporated into Eio with compatibility for 4.12+domains. -
ocaml-multicore/eio#203
Switch toluvbackend if uring canât be usedA
fallbackargument has been added to check ifio_uringis
available on the system. Otherwise, theluvbackend is used.
Enhancement
-
ocaml-multicore/eio#155
AddEio_unix.FDThe
FDmodule has been added tolib_eio/unix/eio_unix.mlto be
used with theLuv.0.5.11asynchronous I/O library. -
ocaml-multicore/eio#165
Addsecure_randomdevice to stdenvA Random module has been added to
lib_eio_luv/eio_luv.ml, and
lib_eio/eio.mlincludes asecure_randomdevice to stdenv. -
ocaml-multicore/eio#166
Simplify Flow interfaceThe
readandwriteclasses have been removed, and we instead use
sourceandsinkfor everything. Also,Flow.read_into src buf
has been renamed toFlow.read src buf. -
ocaml-multicore/eio#168
Move low-level backend functions to submodulesThe Eio abstraction provides top-level functions, and hence the
low-level backend functions have been moved to submodules. -
ocaml-multicore/eio#169
MakeEio.Stdjust provide aliases to EioThe PR allows you to directly refer to
Eio.Promise.t, andEio.Std
provides aliases to Eio. -
ocaml-multicore/eio#171
UDP interfaceAn initial implementation of
UDPsupport to Eioâs networking
interface. Atests/test_network.mdfile has also been added to
test working with UDP and endpoints. -
ocaml-multicore/eio#175
AddBuf_read.parse_exnThe
lib_eio/buf_read.mlfile now includes aparse_exnfunction
that converts parser errors into friendly message. -
ocaml-multicore/eio#177
ReplaceIpaddr.classifywithIpaddr.foldThe
Ipaddr.foldis used instead ofIpaddr.classifyto match the
style ofstdlib. -
ocaml-multicore/eio#178
RenameSink.writetoSink.copyThe
Sink.writefunction has been renamed toSink.copyto match
the actual functionality. -
ocaml-multicore/eio#181
Move ctf to eioThe
Ctfmodule has been moved inside Eio as its API could change
quite often. -
ocaml-multicore/eio#188
AddEio_unix.sleepA
Eio_unix.sleepfunction has been added as a replacement for
Lwt_unix.sleepto not treat time as a capability. -
ocaml-multicore/eio#192
Tidy up forking APIThe
Cancel.cancelhas been optimised, andfork_promisereports
the result against the promise. -
ocaml-multicore/eio#198
AddEio_unix.FD.as_socketWe now wrap a Unix FD as an Eio socket, which is useful for working
with existing libraries that provide aUnix.file_descror when
receiving FDs from socket activation. -
ocaml-multicore/eio#199
Update to new uring API to get FD passingThe
lib_eio_linux/eio_linux.mlfile has been updated to use the
newuring API, and a FD passing test has been added. -
ocaml-multicore/eio#200
Eio_linux: cope with lack of fixed chunksA failure request to allocate a fixed buffer now logs a warning. The
with_chunkfunction takes ann_blocksargument, andfreeis
now calledfree_fixed.
Documentation
-
ocaml-multicore/eio#170
Document how to implement Eio objects yourselfA
Provider Interfacessection has been added to theREADME.md
file that documents how to define your own resources. -
ocaml-multicore/eio#172
Clean up Eio odocThe
Hookis inlined withSwitch, and most modules now have
documentation with an example. -
ocaml-multicore/eio#179
Update odoc foreio_main,eio_luvandeio_linuxThe odoc documentation has been updated for
eio_main,eio_luv,
andeio_linuxfiles. -
ocaml-multicore/eio#180
Update READMEAdditional notes on
Object Capabilitieshave been added in the
README.mdfile along with the current status of the Eio project. -
ocaml-multicore/eio#183
Publish odoc on releaseThe
dune-projectfile has been updated with the link to the odoc
documentation web page for Eio. -
ocaml-multicore/eio#185
Link to generated odoc from READMEThe links to the generated odoc from the
README.mdfile have been
explicitly linked for quick reference. -
ocaml-multicore/eio#186
Minor documentation fixesThe
README.mdandlib_eio/eio.mlidocumentation have been
updated with minor fixes. -
ocaml-multicore/eio#194
Remove confusing use of the word âobjectâThe word
objecthas been removed from theCapabilitiessection
in the README.md file in order to avoid any confusion with OCaml
objects (polymorphic records). -
ocaml-multicore/eio#197
Add more documentationThe documentation on
Cancellationhas been updated with more
low-level details.
Testing
-
ocaml-multicore/eio#184
Tests: use local directory for test socketopam-repo-ciuses a read-only/tmpdirectory, and hence we
switch to using a local directory for testing socket. -
ocaml-multicore/eio#189
Add an exampleEio_nullbackendA skeleton Eio backend with no actual effects has been added as an
example. It is inefficient and not thread-safe, but, exists for
demonstration purpose only. -
ocaml-multicore/eio#191
Suppress cmdliner deprecation warningA
-deprecatedflag is added tolib_eio_linux/tests/eurcp.mlto
suppress cmdliner warnings when testing. -
ocaml-multicore/eio#202
Fix typo in testsThe
lib_eio/eio_linux/tests/fd_passing.mdfile has been updated to
run uring tests withEIO_BACKEND=luv. -
ocaml-multicore/eio#204
Disable Linux mdx test on non-linux platformsUsing the
enabled_ifconstruct fromdune.2.9the Linux MDX tests
are now run only when the system is forlinux.
Tezos
Open
-
ocaml-multicore/tezos#25
Merge updates â disable failing tests temporarilyThe temporary disabling of failing tests, and a merge update for
upstream changes. -
ocaml-multicore/tezos#27
Status of build on 5.0.0+trunkAn issue tracker for the list of failing builds required to build
Tezos on 5.0.0+trunk.
Closed
-
ocaml-multicore/tezos-opam-repository#9
syncA merge that updates the repository with upstream changes up to
January 24, 2022 for the4.12.0+domainsbranch. -
A synchronization of upstream changes to
4.12.0+domainsbranch.
domainslib
Open
-
ocaml-multicore/domainslib#65
Fix build on trunkA patch in Domainslib for the renaming of
Effect.eff -> Effect.t
change has been provided. The CI has now been updated to build for
5.0.0+trunkas well. -
ocaml-multicore/domainslib#66
Domainslib.0.4.1build failure withOCaml 5.0.0+trunkAn
Unbound type constructer efferror occurs when building
Domainslib.0.4.1in Sandmark for OCaml 5.0.0+trunk.
Completed
-
ocaml-multicore/domainslib#64
Changes from opam-repositoryThe
domainslib.opamfile has been updated to useOCaml (>= "5.0"),
anddune (>= "1.8").
ocaml-uring
Closed
Updates
-
ocaml-multicore/ocaml-uring#46
Update toliburing 2.1The sources have been updated to use
liburing.2.1, and
lib/uring/uring_stubs.cnow invokesio_uring_submit(ring). -
ocaml-multicore/ocaml-uring#49
AddsendmsgandrecvmsgThe PR adds
sendmsg(2)andrecvmsg(2)calls to the uring
library, and defines a moduleMsghdr. -
ocaml-multicore/ocaml-uring#50
Cmdliner.1.1.0The
Cmdlinerversion has been updated to 1.1.0 and to use the
latest API for the tests. -
ocaml-multicore/ocaml-uring#52
Allow sending and receiving FDs using SCM_RIGHTSThe target address in
send_msgis optional, and we can now send
and receive FDs with SCM_RIGHTS. -
ocaml-multicore/ocaml-uring#53
Donât allocate a fixed buffer by defaultThe user needs to use
set_fixed_bufferto allocate a fixed size
buffer to avoid hitting a resource limit and locking memory.
Documentation
-
ocaml-multicore/ocaml-uring#47
Prepare releaseThe
CHANGES.mdfile has been updated with new features and changes
for a release. -
ocaml-multicore/ocaml-uring#48
Link to API docsThe
README.mdhas been updated with link to the API
documentation. -
ocaml-multicore/ocaml-uring#54
Prepare releaseThe
CHANGES.mdfile has been updated with new and breaking changes
to prepare for a release.
retro-httpaf-bench
Open
-
ocaml-multicore/retro-httpaf-bench#19
cohttp-eio: add cohttp-eio based benchmarkA
cohttp_eiobenchmark has been added with updates to the
benchmarking scripts. -
ocaml-multicore/retro-httpaf-bench#21
Simpler hyper serverAn implementation of a simple hyper server that uses Tokioâs
multi-threaded scheduler. -
ocaml-multicore/retro-httpaf-bench#22
Add version bound for shuttleThe
shuttle.0.3.1version is explicitly specified in order to keep
the benchmarks running, even if there are breaking changes in future
shuttle releases.
Completed
-
ocaml-multicore/retro-httpaf-bench#20
Update toEio0.1The Dockerfile has been updated to use
Eio0.1.
Sundries
Open
-
ocaml-multicore/eventlog-tools#6
Updateeventlog-toolsfor MulticoreA work-in-progress to update
eventlog-toolsfor Multicore OCaml. -
ocaml-multicore/tezos#24
Test suite failureAn ongoing fix for the
Alcotest_engine__Core.Make(P) (M)error
when running the tests. -
ocaml-multicore/effects-examples#26
Port to OCaml 5.00The Rename
Effect.{eff=>t} PR is
required to port theEffectsexamples to run with OCaml 5.0,
without the dedicated effects syntax.
Closed
-
ocaml-multicore/eventlog-tools#5
Updateconsts.mlto work with OCaml 4.13The
force_minor/memprofsources have been included in
lib/consts.mlto build eventlog-tools for OCaml 4.13.1. -
ocaml-multicore/lockfree#9
Updatecpu_relaxto new locationThe
Domain.Sync.cpu_relaxhas been updated withcpu_relaxin
src/backoff.mlto build with OCaml 5.0.0. -
ocaml-multicore/lockfree#10
Remove unused dependencies from opam fileThe
kcaspackage is not a dependency oflockfree, and
ocamlfindandocamlbuildare not needed any more. These three
dependencies have been removed from thelockfree.opamfile. -
ocaml-multicore/kcas#11
Updatecpu_relaxto new locationThe PR updates
Domain.Sync.cpu_relaxinsrc/backoff.mlso that
it can compile with OCaml 5.0.0.
Benchmarking
Sandmark
Open
-
ocaml-bench/sandmark#274
Custom Variant SupportThe configuration to build developer branches in Sandmark for a
specific branch, configure options, runtime parameters, a name for
the variant, dependency package override, package removal list, and
an expiry date until which the Sandmark nightly runs should occur is
almost complete. The sample JSON configuration file is as follows:[ { "url" : "https://github.com/ocaml-multicore/ocaml-multicore/archive/parallel_minor_gc.tar.gz", "configure" : "-q", "runparams" : "v=0x400", "name": "5.00+trunk+kc+pr23423", "expiry": "YYYY-MM-DD"}, ...] -
ocaml-bench/sandmark#279
Update notebooks/ To 5.00.0+trunkThe Jupyter notebooks in the notebooks/ folder need to be updated to
use the 5.0.0+trunk, by default. -
ocaml-bench/sandmark#280
Upstream 5.00.0+trunk dependency packagesA number of Sandmark dependency package patches have been upstreamed
to the respective maintainers or to the OPAM repository. A few more
patches remain to be submitted upstream. -
ocaml-bench/sandmark#282
Analyse Bytecode PerformanceThe Sandmark benchmarks produce native code, by default, and we
would like to run the byte code version of the benchmarks to
identify any regression between 4.13 or 4.14 with 5.0.0+trunk. -
ocaml-bench/sandmark#285
Evaluate merging parallel run_config.json filesA request to combine
multicore_parallel_run_config.jsonand
multicore_parallel_navajo_run_config.jsoninto one JSON file, so
that we add new benchmarks to one place instead of two (or more). -
ocaml-bench/sandmark#286
Updatecheck_urland validate URL in custom.json filesThe
check_urltarget in the Makefile needs to check if a URL is
present for each and every entry in thecustom.jsonfile, and that
the URL actually exists.
Closed
Build
-
ocaml-bench/sandmark#270
Update to 5.00.0+domainsThe dependencies and benchmarks to run 5.00.0+domains variant have
been updated to build in Sandmark. -
ocaml-bench/sandmark#276
Re-add 5.00.0+trunk with CI failure:ignore optionThe .drone.yml CI is updated to ignore a failed build for
5.00.0+trunk, so that we can continue to merge changes as long as
5.00.0+stable Sandmark builds fine. -
ocaml-bench/sandmark#278
Updated run_all scripts and 5.00.0+stable to February 3, 2022 commitThe
run_allscripts have been updated to useSYS_DUNE_HACK, and
the 5.00.0+stable variant has been updated to the February 3, 2022
ocaml/ocamlcommit. -
ocaml-bench/sandmark#295
Clean OCaml dependencies/packages fully after a buildThe
ocaml-base-compilerandocamldependency packages folder
need to be cleaned correctly, as they are used in subsequent
sandmark-nightly runs.
Enhancement
-
ocaml-bench/sandmark#271
Parameterize ocaml-variants information as Docker environment variablesThe following variables have been parameterized in the Sandmark
Makefile to be used as environment variables to support theCustom Variant Supportfeature request:SANDMARK_DUNE_VERSION SANDMARK_URL SANDMARK_REMOVE_PACKAGES SANDMARK_OVERRIDE_PACKAGES -
ocaml-bench/sandmark#283
Add Custom Variant Support featureAn initial support for the Custom Variant Support feature that
allows you to specifyurl,tag,config_json,name,expiry,
environment,configure, andrunparamsin a custom.json file
has been merged to run with sandmark-nightly. -
ocaml-bench/sandmark#284
Use specific name in .orun.summary.bench outputThe
namespecified in a custom.json file is now used in the
orun.summary.benchresults file. -
ocaml-bench/sandmark#287
Use separate custom variant JSON files per serverTwo separate
custom_navajo.jsonandcustom_turing.jsonfiles
have been created for sandmark-nightly execution runs. -
ocaml-bench/sandmark#291
Custom script log output to results directoryThe build and execution logs are now stored along with the benchmark
results for easy access in the UI. -
ocaml-bench/sandmark#293
Allow raw GitHub JSON configuration input for custom variantYou can now use a
CUSTOM_FILEenvironment variable to pass a
remote file as an input configuration to the Custom Support Variant
feature request.
Documentation
-
ocaml-bench/sandmark#268
Update README CI Build status to main branchThe CI
Build Statusfor themainbranch in Sandmark has been
updated to point to the main branch. -
ocaml-bench/sandmark#277
Sync and update README from master branchThe README changes from the Sandmark master branch have been synced
up with the main branch, as we will soon switch to using the main
branch as the default branch in Sandmark.
Sundries
-
ocaml-bench/sandmark#281
Sandmark.ocamllabs.io shows error instead of parallel benchmarksThe production server has been deployed with the latest nightly
scripts, and the web application that fixes the display of the
parallel benchmarks. -
ocaml-bench/sandmark#289
Use CPU 5 in run_config.json for consistencyThe
oruncommand now uses CPU 5 to be consistent with the other
wrappers. This is not an issue with the CI runs. -
ocaml-bench/sandmark#292
Use Task run in parallel benchmarksThe
domainslib.0.4.1package has been updated in Sandmark, and the
parallel_forandawaitcalls are now wrapped inTask.run. -
ocaml-bench/sandmark#296
Use a singleTask.runin parallel benchmarksA fix where the
Task.poolinside the iter function was blocking
indefinitely. Now theLU_decomposition_multicore.exeparallel
benchmark runs correctly.
Sandmark-nightly
Open
-
ocaml-bench/sandmark-nightly#21
Add 5.0 variantsThe sandmark-nightly scripts now run 5.0 variants, but, the
pausetimes withocaml/ocamlneeds to be updated. -
ocaml-bench/sandmark-nightly#42
Alert notification for Sandmark nightly runsA daily status summary of the nightly runs should be sent to a
deployment ofocaml-matrixserver. -
ocaml-bench/sandmark-nightly#45
Refactor sandmark-nightlyA list of changes that are required to clean up the sandmark-nightly
repository, and move the scripts to Sandmark. Thus, sandmark-nightly
will just store the data results, and sandmark will have the code. -
ocaml-bench/sandmark-nightly#48
Numbered list is misaligned in the home pageThe list indentation is incorrect in the home page and it needs to
be fixed. -
ocaml-bench/sandmark-nightly#49
Add Sandmark info to sandmark-nightlyA PR that shows the commit version and branch of Sandmark used in
the sandmark-nightly in the UI.
Closed
-
ocaml-bench/sandmark-nightly#27
Include the baseline variant information in the normalised graphsThe normalised graph now includes the information of the baseline
variant used for comparison. -
ocaml-bench/sandmark-nightly#34
Parallel benchmarks should be run onocaml/ocaml#trunkThe CI parallel benchmarks execution runs have been switched to run
forocaml/ocaml#trunk. -
ocaml-bench/sandmark-nightly#37
Sequential results comparison is brokenThe inclusion of the meta header first line is the .bench output is
now handled in the UI. -
ocaml-bench/sandmark-nightly#40
The information in the landing page is out of dateThe landing page now displays both
stableandtrunkvariants
correctly. -
ocaml-bench/sandmark-nightly#50
Simple fix for index page to display text properlyThe trailing whitespaces and list indentation have been fixed.
current-bench
Open
End Users
-
ocurrent/current-bench#306
WIP ocaml compiler benchmarksA high-level issue tracker for building
ocaml/ocamlcompiler
benchmarks, and necessary tooling with current-bench. -
ocurrent/current-bench#311
Raspberry Pi long term supportThe Raspberry Pi is now added to the
current-benchcluster, and
you can add an entry for the same toenvironments/production.conf
as shown below:{ "repositories": [ { "name": "mirage/irmin", "worker": "rpi4b", "image": "ocaml/opam:debian-11-ocaml-4.12" }A way to handle the fan noise during intensive Irmin benchmarks on
the Raspberry Pi is needed.
Enhancement
-
ocurrent/current-bench#312
Time schedulingA benchmark is run on a new commit, or on the default branch, or for
a PR. We need to add support to schedule jobs on a timely basis. -
ocurrent/current-bench#314
Retro-benchmark new repositoriesA feature request to be able to run benchmark results on older
commits for a newer current-bench deployment.
Frontend
-
ocurrent/current-bench#313
Record commits messagesThe commit first-line description needs to be shown along with the
commit hash in the UI. -
ocurrent/current-bench#317
Frontend rewriteThe frontend uses Rescript, and the current plotting library has its
limitations. An open issue to discuss rewriting the frontend. -
ocurrent/current-bench#322
Adjust units on comparison commit values toolThe
adjustfunction is now called on both the benchmark and the
comparison values to show the same units. -
ocurrent/current-bench#323
Allow clicking on the legend to show/hide plot lines and use more columnsThe legend now uses more columns when clicking on the show/hide plot
in the UI as shown below: -
ocurrent/current-bench#324
Disabled worker / docker imageThe frontend automatically selects the first âenvironmentâ (worker +
Docker image) and the system may contain disabled ones. The
environment list needs to be filtered for the active entries only. -
ocurrent/current-bench#326
frontend: Fix bug with using same x-axis for all metricsThe PR fixes the change to use the correct meta-data for all the
commits, for every metric in the x-axis.
Testing
-
ocurrent/current-bench#316
Real-life testingcurrent-bench requires both functional and integration tests for
checking on failure conditions and to validate the backend pipeline. -
ocurrent/current-bench#318
Cobench user libraryA validation test interface, when adding new benchmarks, is needed
to check that the expected JSON output from themake benchoutput
conforms to the latest schema.
Monitoring
-
ocurrent/current-bench#290
Add optional field to JSONA request to add an optional field in the JSON object whose values
can be printed verbatim in the log. -
ocurrent/current-bench#298
Production logs and warningsThe filtering of the logs based on a component in the pipeline will
be useful for troubleshooting and debugging production issues. -
ocurrent/current-bench#319
Github bot messagesSimilar to code coverage reports, it will be nice to produce
detailed performance regressions results on GitHub PRs.
Closed
Build
-
ocurrent/current-bench#282
Docker compose for stack deployA
docker-compose.yamlfile can now build the backend pipeline and
frontend stack for deployment. -
ocurrent/current-bench#301
Worker support for raspberry ARM: add new argument to specify archThe architecture argument has been added to the
run_command
function to allow the use of Raspberry Pi ARM as a worker. -
ocurrent/current-bench#305
Updateocamlformatversion to0.20.1The
ocamlformatversion has been updated from0.19.0to0.20.1.
Enhancement
-
ocurrent/current-bench#289
Fix URL missing pull numberThe URL should contain the PR number when redirecting to add the
worker or Docker image. -
ocurrent/current-bench#292
Return better HTTP error codes for API requestsThe client requests now receive correct HTTP error codes for
exception handling.
Frontend
-
ocurrent/current-bench#293
Make log links noticeable by removing log ID from link textA link to view the build and execution logs is now provided in the
UI, instead of the log UUIDs. -
ocurrent/current-bench#299
Fix GitHub status update: wait for benchmark to terminateThe GitHub status of the application should show a green âpassâ
state only after the successful execution of the benchmarks. -
ocurrent/current-bench#308
frontend: Fix incorrect GraphQL query for default benchmarkThe default benchmark now has a name instead of NULL to satisfy
PostgreSQLâs UNIQUE constraint. -
ocurrent/current-bench#309
Make it easier to go back to âhome pageâ from error viewA side bar has been added to the error view for easier navigation.
-
ocurrent/ocurrent#309
Show line numbers and allow jumping to specific lines in job logsA URL like
http://localhost:8080/job/2022-02-09/115753-docker-build-71c777#L11-L15
would highlight lines 11 to 15 and scroll the page to line 11 as
illustrated below: -
ocurrent/current-bench#320
Show all commits for all metrics and highlight failed metricsThe metrics that do not have a value for the latest commit are
considered failed commits, but, all the metrics are shown in the
UI. The graphs are also made full width and aligned vertically as
shown below: -
ocurrent/current-bench#325
Display old commit benchmarks warning irrespective of build statusThe UI now shows the old commit benchmarks warnings.
Testing
-
ocurrent/current-bench#294
Add unit testsA
pipeline/testsfolder has been created with unit tests, and you
can run them from thepipeline/directory as follows:$ dune runtest $ dune exec tests/test.exe -
ocurrent/current-bench#307
Add coverage using bisect_ppxThe Makefile now includes a
coveragetarget that uses
bisect_ppx, and generates a HTML coverage report.
Sundries
-
ocurrent/current-bench#281
Document how to add workersThe
HACKING.mdfile has been updated with information on how to
add new workers to the cluster, and configuration of remote workers
to run the benchmarks. -
ocurrent/current-bench#295
Fix benchmark name unique constraintPostgreSQL does not consider NULL values to be equal and hence the
conflict on UNIQUE constraint for the benchmark name does not get
triggered. This creates duplicate rows in the database, and this PR
provides fixes at the application and the database level. -
ocurrent/current-bench#296
Capture line numbers of where metrics appear in the logsThe line numbers of the metrics from the logs are now captured in
the database. -
ocurrent/current-bench#303
Run DB migrations on pipeline startThe database migrations are now run prior to starting the
application, which were earlier defined in amaketarget. -
ocurrent/current-bench#304
Update deprecated Term functionsThe
cmdliner.1.1.0package has been updated along with changes to
remove the use of the deprecatedTermfunctions.
Our special thanks to all the OCaml users, developers and contributors
in the community for their valuable time and continued support to the
project.
Acronyms
- AFL: American Fuzzy Lop
- AMD: Advanced Micro Devices
- API: Application Programming Interface
- ARM: Advanced RISC Machines
- AWK: Aho Weinberger Kernighan
- BSD: Berkeley Software Distribution
- CI: Continuous Integration
- CTF: Common Trace Format
- DB: Database
- EOL: End Of Life
- FD: File Descriptor
- FFI: Foreign Function Interface
- GC: Garbage Collector
- GNU: GNUâs Not Unix
- HTTP: Hypertext Transfer Protocol
- IO: Input/Output
- IR: Intermediate Representation
- JSON: JavaScript Object Notation
- MD: Markdown
- OPAM: OCaml Package Manager
- POSIX: Portable Operating System Interface
- PR: Pull Request
- RHEL: Red Hat Enterprise Linux
- STW: Stop The World
- UDP: User Datagram Protocol
- UI: User Interface
- URL: Uniform Resource Locator
- UUID: Universally Unique Identifier
- VM: Virtual Machine
- WSL: Windows Subsystem for Linux


