v4: https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02679.html
Changes since v4: - Rebase on v3.1.0. Quite a few conflicts, but the resulting diffs are simpler than in v4. - Re-run benchmarks on a different Skylake machine (this one is a server with a lower clock frequency). - Add comment on the resizing policy and mechanism. - Change the downsizing policy. Instead of not downsizing until a certain number of consecutive low use rates, keep track of the max use rate in a given time window (100ms), and downsize according to that max. This makes the policy resistant to guests that flush *very* quickly and often (I was not happy about just waiting until a certain number of flushes, since we cannot know what that number should be for all guests). The new policy has the shortcoming that since we check the time on the host, if the host is overcommitted we might downsize too aggressively. So the policy isn't perfect, but the gains are big enough that we might want to merge this as a start. Here's v4 vs. v5: https://imgur.com/jkcFkdv v4 is a little better for mcf, but v5 is better for xalancbmk, and the average speedup is almost the same (1.48x vs. 1.51x, respectively). You can fetch this series from: https://github.com/cota/qemu/tree/tlb-dyn-v5 Thanks, Emilio --- accel/tcg/cputlb.c | 186 ++++++++++++++++++++++++++++++++++++++++++++-- include/exec/cpu-all.h | 9 +++ include/exec/cpu-defs.h | 48 +++++++++++- include/exec/cpu_ldst.h | 21 ++++++ tcg/aarch64/tcg-target.h | 1 + tcg/arm/tcg-target.h | 1 + tcg/i386/tcg-target.h | 1 + tcg/i386/tcg-target.inc.c | 28 +++---- tcg/mips/tcg-target.h | 1 + tcg/ppc/tcg-target.h | 1 + tcg/s390/tcg-target.h | 1 + tcg/sparc/tcg-target.h | 1 + tcg/tci/tcg-target.h | 1 + 13 files changed, 278 insertions(+), 22 deletions(-)