From: Fiona Ebner <f.ebner@proxmox.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: "Michael S . Tsirkin" <mst@redhat.com>
Subject: Re: [PULL 05/11] hpet: fix and cleanup persistence of interrupt status
Date: Wed, 19 Mar 2025 16:28:48 +0100 [thread overview]
Message-ID: <8183674f-a9cc-4727-bb52-fe3d3e44804b@proxmox.com> (raw)
In-Reply-To: <20240723141529.551737-6-pbonzini@redhat.com>
Hi,
Am 23.07.24 um 16:15 schrieb Paolo Bonzini:
> There are several bugs in the handling of the ISR register:
>
> - switching level->edge was not lowering the interrupt and
> clearing ISR
>
> - switching on the enable bit was not raising a level-triggered
> interrupt if the timer had fired
>
> - the timer must be kept running even if not enabled, in
> order to set the ISR flag, so writes to HPET_TN_CFG must
> not call hpet_del_timer()
we've been getting user reports about increased CPU usage for QEMU
processes on the host after they updated from QEMU 9.0 to QEMU 9.2.
Bisecting points to this change, and users confirmed that adding the
machine option hpet=off reduces the CPU usage again. Some quick
experimentation suggests that in particular the last part here, i.e.
"timer must be kept running even if not enabled" is the reason for this.
I reproduced the issue with a Debian 12.10 guest with kernel 6.1. It
enables and then immediately disables the HPET timer again during boot
(i.e. the HPET_TN_ENABLE bit).
I also installed 6.13.7 in the guest for comparison, but that just made
the issue worse, because it uses a higher frequency for the timer.
Is this something Linux should/could handle differently? I suppose there
is nothing that can be done on the QEMU side to avoid this while aiming
to keep the implementation correct?
If necessary, our management layer downstream could disable the hpet
timer by default and make users explicitly enable it if
desired/required. I just wanted to ask if the issue is known and if
there are any other suggestions? Thanks!
Best Regards,
Fiona
next prev parent reply other threads:[~2025-03-19 15:29 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-23 14:15 [PULL 00/11] target/i386, HPET changes for QEMU 9.1 soft freeze Paolo Bonzini
2024-07-23 14:15 ` [PULL 01/11] target/i386: do not crash if microvm guest uses SGX CPUID leaves Paolo Bonzini
2024-07-23 14:15 ` [PULL 02/11] qio: add support for SO_PEERCRED for socket channel Paolo Bonzini
2024-07-23 14:15 ` [PULL 03/11] tools: build qemu-vmsr-helper Paolo Bonzini
2024-07-25 10:28 ` Peter Maydell
2024-07-25 10:30 ` Paolo Bonzini
2024-07-23 14:15 ` [PULL 04/11] Add support for RAPL MSRs in KVM/Qemu Paolo Bonzini
2024-07-25 10:25 ` Peter Maydell
2024-07-23 14:15 ` [PULL 05/11] hpet: fix and cleanup persistence of interrupt status Paolo Bonzini
2025-03-19 15:28 ` Fiona Ebner [this message]
2025-03-19 15:30 ` Paolo Bonzini
2025-03-19 15:47 ` Fiona Ebner
2025-03-19 15:51 ` Paolo Bonzini
2025-03-19 15:56 ` Fiona Ebner
2024-07-23 14:15 ` [PULL 06/11] hpet: ignore high bits of comparator in 32-bit mode Paolo Bonzini
2024-07-23 14:15 ` [PULL 07/11] hpet: remove unnecessary variable "index" Paolo Bonzini
2024-07-23 14:15 ` [PULL 08/11] hpet: place read-only bits directly in "new_val" Paolo Bonzini
2024-07-23 14:15 ` [PULL 09/11] hpet: accept 64-bit reads and writes Paolo Bonzini
2024-07-23 14:15 ` [PULL 10/11] hpet: store full 64-bit target value of the counter Paolo Bonzini
2024-07-23 14:15 ` [PULL 11/11] hpet: avoid timer storms on periodic timers Paolo Bonzini
2024-07-24 2:58 ` [PULL 00/11] target/i386, HPET changes for QEMU 9.1 soft freeze Richard Henderson
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=8183674f-a9cc-4727-bb52-fe3d3e44804b@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).