The main motivation for this patch is to improve the performance of VM.
This patch series introduces how to enable the timer passthrough in
non-root mode.
The main idea is to offload the host timer to the preemtion timer in
non-root mode. Through doing this, guest can write tscdeadline msr directly
in non-root mode and host timer isn't lost. If CPU is in root mode,
guest timer is switched to software timer.
Testing on Intel(R) Xeon(R) Platinum 8260 server.
The guest OS is Debian(kernel: 4.19.28). The specific configuration is
is as follows: 8 cpu, 16GB memory, guest idle=poll
memcached in guest(memcached -d -t 8 -u root)
I use the memtier_benchmark tool to test performance
(memtier_benchmark -P memcache_text -s guest_ip -c 16 -t 32
--key-maximum=10000000000 --random-data --data-size-range=64-128 -p 11211
--generate-keys --ratio 5:1 --test-time=500)
Total Ops can be improved 25% and Avg.Latency can be improved 20% when
the timer-passthrough is enabled.