cputlb: Move cpu->pending_tlb_flush to env->tlb_c.pending_flush
commit60a2ad7d86e7379e6669806bedaa6cfdf4f2c2f4
authorRichard Henderson <richard.henderson@linaro.org>
Sat, 20 Oct 2018 20:54:46 +0000 (20 13:54 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 31 Oct 2018 12:16:02 +0000 (31 12:16 +0000)
tree5be474696ef4d3007d8ac189f3d2e6bff66c2735
parent8ab102667e4c700082e2e923905e0b443518795c
cputlb: Move cpu->pending_tlb_flush to env->tlb_c.pending_flush

Protect it with the tlb_lock instead of using atomics.
The move puts it in or near the same cacheline as the lock;
using the lock means we don't need a second atomic operation
in order to perform the update.  Which makes it cheap to also
update pending_flush in tlb_flush_by_mmuidx_async_work.

Tested-by: Emilio G. Cota <cota@braap.org>
Reviewed-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
accel/tcg/cputlb.c
include/exec/cpu-defs.h
include/qom/cpu.h