InnoDB atomics implementation is getting worse: 5.7 implementation is not maintainable. We should remove it and use atomics provided by server instead.
InnoDB is now full of meaningless memory barriers, these should be removed along with memory barriers implementation.
We should restore fixes for InnoDB rwlocks.
Mutexes should be cleaned up so that their code is readable. Also we should ensure that mutexes issue proper memory barriers.
NOTE: there're 4 mutex implementations in InnoDB: futex base, spin lock (never used), pthread/critical_section based, event based (default). We should consider removing 3 implementations and leaving only pthread/critical_section based solution.