qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Timer delays in VM


From: Eugene Huang
Subject: Timer delays in VM
Date: Mon, 28 Feb 2022 06:22:35 +0000

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]