Linux KVM/arm64 development list
 help / color / mirror / Atom feed
* Timer delays in VM
@ 2022-02-28 18:02 Eugene Huang
  2022-02-28 21:02 ` Marc Zyngier
  0 siblings, 1 reply; 10+ messages in thread
From: Eugene Huang @ 2022-02-28 18:02 UTC (permalink / raw)
  To: kvmarm@lists.cs.columbia.edu


[-- Attachment #1.1: Type: text/plain, Size: 1003 bytes --]

Hi,

I am running qemu on an arm64 CentOS host. Inside a ubuntu VM, a process runs a timer created using timer_t:
ev.sigev_notify_function = m_callback;
...
timer_create(CLOCK_MONOTONIC, &ev, &m_timer_t);

This timer sometimes has significant delays. For example, the 50 ms timer can have a callback delay of 100ms.

I did a host kernel trace and see a lot of WFx kvm_exits, and  the following events between kvm_exit and kvm_entry:
kvm_exit
kvm_wfx_arm64
kvm_get_timer_map
sched_switch
kvm_timer_save_state
kvm_timer_update_irq
vgic_update_irq_pending
kvm_timer_restore_state
kvm_vcpu_wakeup
kvm_arm_setup_debug
kvm_arm_set_dreg32
kvm_entry

I have the following questions:

  1.  Why there are a lot WFx exits? Is the timer dependent on it?
  2.  Does this timer rely on kvm timer irq injection?
  3.  What can be any possible causes for the timer delay? Are there some locking mechanisms which can cause the delay?
  4.  What parameters can tune this timer?

Thanks.


[-- Attachment #1.2: Type: text/html, Size: 7310 bytes --]

[-- Attachment #2: Type: text/plain, Size: 151 bytes --]

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-03-08 11:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-28 18:02 Timer delays in VM Eugene Huang
2022-02-28 21:02 ` Marc Zyngier
2022-03-01  9:06   ` Andrew Jones
2022-03-01 19:03   ` Eugene Huang
2022-03-02  2:27     ` Eugene Huang
2022-03-02  7:28     ` Marc Zyngier
2022-03-03  5:49       ` Eugene Huang
2022-03-03 14:42         ` Marc Zyngier
2022-03-08  7:50           ` Eugene Huang
2022-03-08  9:34             ` Marc Zyngier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox