Vesa Karvonen

Results 168 comments of Vesa Karvonen

Sorry for taking a long time to reply! > I see there’s already a PR that uses ocurrent’s benchmark tools. Is this for certain? It is work in progress. The...

I would recommend not handling unknown effects and allowing the runtime to raise [the `Unhandled` exception](https://v2.ocaml.org/api/Effect.html#EXCEPTIONUnhandled). This allows library and application code to handle the `Unhandled` exception — to e.g....

> We do this to respect the rule: an effect supends the task. What do you think? Does this mean that an effect that is unkown to Miou basically has...

Thanks for the feedback! The current implementation is still mostly for my experimental uses, meaning that I want to understand what is the minimal possible overhead imposed by a library...

> You use `Multicore_magic` all over the place. This may be necessary, but is it? (How would array-of-references fare in practice instead of dealing with padding unsafely by hand?) The...

> Is this just a guess, or have you measured this? This is based on my understanding of computer architecture and the OCaml memory model and runtime. It is not...

> As far as I know, the major heap uses per-domain page-aligned pools, so I'm not sure we can have false sharing between values promoted from the minor heaps of...

```ocaml let next (id : managed_id) = Array.unsafe_get !next_sibling (id :> int) (* unsafe consumer code: *) let weird = Array.init 1024 (fun () -> Domain.spawn (fun () -> Idle_domains.(self...

> My mental model of false sharing is that data races on a cache line (access from two CPUs, at least one of them writing (or CASing)) are expensive. >...

FYI, I wrote a [gist](https://gist.github.com/polytypic/781a69a0a8e2d1f3ddcc4170887fc412) with an explanation of the simplified MSI model and included a program that tries to quantify the costs of various transitions.