From: Eugene Huang <eugeneh@nvidia.com>
To: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Timer delays in VM
Date: Mon, 28 Feb 2022 06:22:35 +0000 [thread overview]
Message-ID: <BYAPR12MB3192248D73D9C8AF64076A62D9019@BYAPR12MB3192.namprd12.prod.outlook.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1019 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 #2: Type: text/html, Size: 7895 bytes --]
next reply other threads:[~2022-02-28 7:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-28 6:22 Eugene Huang [this message]
2022-02-28 11:02 ` Timer delays in VM Peter Maydell
2022-02-28 18:02 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BYAPR12MB3192248D73D9C8AF64076A62D9019@BYAPR12MB3192.namprd12.prod.outlook.com \
--to=eugeneh@nvidia.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.