Re: [Qemu-devel] [PATCH v2 4/4] cputlb: read CPUTLBEntry.addr_write atomically

2018-10-03 Thread Emilio G. Cota
On Thu, Oct 04, 2018 at 00:01:47 -0400, Emilio G. Cota wrote: > Speedup over master (snip) > That is, a 5% average slowdown, with a max slowdown of ~14% for > mcf :-( png chart: https://imgur.com/a/5Jghi6Q E.

Re: [Qemu-devel] [PATCH v2 4/4] cputlb: read CPUTLBEntry.addr_write atomically

2018-10-03 Thread Emilio G. Cota
On Wed, Oct 03, 2018 at 16:04:54 -0400, Emilio G. Cota wrote: > Updates can come from other threads, so readers that do not > take tlb_lock must use atomic_read to avoid undefined > behaviour (UB). > > This and the previous commit result in a small performance decrease, > but this is a fair price

[Qemu-devel] [PATCH v2 4/4] cputlb: read CPUTLBEntry.addr_write atomically

2018-10-03 Thread Emilio G. Cota
Updates can come from other threads, so readers that do not take tlb_lock must use atomic_read to avoid undefined behaviour (UB). This and the previous commit result in a small performance decrease, but this is a fair price for removing UB. Host: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz - Before