Skip to the content.

Documentation/timers/

Documentation/timers/highres.rst

完全没更新

Documentation/timers/hrtimers.rst

理解下,为什么还有人使用 jiifies 的 timer 的?

Documentation/timers/no_hz.rst

Documentation/timers/timekeeping.rst

细节

Documentation/core-api/timekeeping.rst

Documentation/virt/kvm/x86/timekeeping.rst

  1. X86_FEATURE_TSC_RELIABLE : 用来说明什么?

tsc 含有很多属性,这都是 13900k 含有的:

kvm 相关的有: tsc_scaling tsc_offset

Documentation/virt/kvm/devices/vcpu.rst

https://www.kernel.org/doc/html/latest/virt/kvm/devices/vcpu.html#group-kvm-vcpu-tsc-ctrl

  1. GROUP: KVM_VCPU_TSC_CTRL 中描述了

我靠,这是在说什么啊?

timer

时钟

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/virtualization_deployment_and_administration_guide/chap-kvm_guest_timing_management

Guest virtual machines without accurate time keeping may experience issues with network applications and processes, as session validity, migration, and other network activities rely on timestamps to remain correct.

KVM avoids these issues by providing guest virtual machines with a paravirtualized clock (kvm-clock). However, it is still important to test timing before attempting activities that may be affected by time keeping inaccuracies, such as guest migration.

By default, the guest synchronizes its time with the hypervisor as follows:

Modern Intel and AMD CPUs provide a constant Time Stamp Counter (TSC). The count frequency of the constant TSC does not vary when the CPU core itself changes frequency, for example to comply with a power-saving policy. A CPU with a constant TSC frequency is necessary in order to use the TSC as a clock source for KVM guests.

找到代码证据,从 cmos 中获取到系统时间是如何实现的

kvmclock_init 中注册了,类似的地方也是注册了 cmos 的获取到 wallclock

	x86_platform.get_wallclock = kvm_get_wallclock;

..

https://oenhan.com/kvm-pv-kvmclock-tsc

这是在说一个事情吗?

suse

1

https://www.suse.com/c/cpu-isolation-introduction-part-1/

It performs many jobs:

6

https://www.suse.com/c/cpu-isolation-nohz_full-troubleshooting-tsc-clocksource-by-suse-labs-part-6/

勉强看看

https://github.com/0xAX/linux-insides/tree/master/Timers

附带

vmware 的总结

https://www.vmware.com/files/pdf/techpaper/Timekeeping-In-VirtualMachines.pdf

blog

https://tcbbd.moe/linux/qemu-kvm/kvm-time/ : 基本正确

本站所有文章转发 CSDN 将按侵权追究法律责任,其它情况随意。