Allow changing the number of TLB entries for
testing/tunning purpose.
Example to force a 34Kf cpu with 64 TLB:
$ qemu-system-mipsel -cpu 34Kf,tlb-entries=64 ...
This is helpful for developers of the Yocto Project [*]:
Yocto Project uses qemu-system-mips 34Kf cpu model, to run 32bit
MIPS CI loop. It was observed that in this case CI test execution
time was almost twice longer than 64bit MIPS variant that runs
under MIPS64R2-generic model. It was investigated and concluded
that the difference in number of TLBs 16 in 34Kf case vs 64 in
MIPS64R2-generic is responsible for most of CI real time execution
difference. Because with 16 TLBs linux user-land trashes TLB more
and it needs to execute more instructions in TLB refill handler
calls, as result it runs much longer.
[*] https://lists.gnu.org/archive/html/qemu-devel/2020-10/msg03428.html
Buglink: https://bugzilla.yoctoproject.org/show_bug.cgi?id=13992
Reported-by: Victor Kamensky <kamensky@cisco.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---