m...@netbsd.org wrote: > Considering JITs are a much bigger risk, and how cheap this suggestion > is, should we use lfence / similar for other architectures within sljit > (and possibly lua)?
While everyone seems to be concerned on negative performance impact of Spectre, I recently worked on preventing speculative loads to avoid trashing caches and keeping tails of performance in good shape. I found that lfence was ineffective and I had to insert data dependency and some extra work to distract processor. It worked much better and it improved latencies in tails. If you look at Intel's documentation of lfence, they make it very clear that lfence doesn't prevent speculative loads. -- Alex