Use of spinlocks in Erlang
Tue Jan 7 10:01:12 CET 2020
There is an interesting discussion going on about the "correct" use of
spinlocks in user space applications on Linux on the LKML. That discussion
prompted me to check the OTP source on how locks are implemented.
Some of the arguments of the LKML discussion would seem to apply to the
spinlocks (and maybe event the mutexes) used in Erlangs ERTS as well.
The main takeaway seem to be this quote from Linus:
> I repeat: *do not use spinlocks in user space, unless you actually know
what you're doing*. And be aware that the likelihood that you know what you
are doing is basically nil.
Could any of the Erlang gurus or ERTS developers comment on the use of
home grown mutexes and spinlocks in Erlang in light of that discussion?
Blog post that started it:
Linus follow up:
Linus additional follow up:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions