[pve-devel] applied: [PATCH qemu] revert hpet changes to fix performance regression

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Mar 26 10:10:05 CET 2025


Am 19.03.25 um 17:39 schrieb Fiona Ebner:
> As reported in the community forum [0][1], QEMU processes for Linux
> guests would consume more CPU on the host after an update to QEMU 9.2.
> The issue was reproduced and bisecting pointed to QEMU commit
> f0ccf77078 ("hpet: fix and cleanup persistence of interrupt status").
> 
> Some quick experimentation suggests that in particular the last part
>  is responsible for the issue:
>> - 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()
> 
> Users confirmed that setting the hpet=off machine flag works around
> the issue[0]. For Windows (7 or later) guests, the flag is already
> disabled, because of issues in the past [2].
> 
> Upstream suggested reverting the relevant patches for now [3], because
> other issues were reported too. All except commit 5895879aca ("hpet:
> remove unnecessary variable "index"") are actually dependent on each
> other for cleanly reverting f0ccf77078, and while not strictly
> required, that one was reverted too for completeness.
> 
> [0]: https://forum.proxmox.com/threads/163694/
> [1]: https://forum.proxmox.com/threads/161849/post-756793
> [2]: https://lists.proxmox.com/pipermail/pve-devel/2012-December/004958.html
> [3]: https://lore.kernel.org/qemu-devel/CABgObfaKJ5NFVKmYLFmu4C0iZZLJJtcWksLCzyA0tBoz0koZ4A@mail.gmail.com/
> 
> Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
> ---
>  ...void-timer-storms-on-periodic-timers.patch |  50 ++++
>  ...e-full-64-bit-target-value-of-the-co.patch | 203 +++++++++++++
>  ...-hpet-accept-64-bit-reads-and-writes.patch | 281 ++++++++++++++++++
>  ...e-read-only-bits-directly-in-new_val.patch |  64 ++++
>  ...et-remove-unnecessary-variable-index.patch |  68 +++++
>  ...re-high-bits-of-comparator-in-32-bit.patch |  40 +++
>  ...and-cleanup-persistence-of-interrupt.patch | 120 ++++++++
>  debian/patches/series                         |   7 +
>  8 files changed, 833 insertions(+)
>  create mode 100644 debian/patches/pve/0051-Revert-hpet-avoid-timer-storms-on-periodic-timers.patch
>  create mode 100644 debian/patches/pve/0052-Revert-hpet-store-full-64-bit-target-value-of-the-co.patch
>  create mode 100644 debian/patches/pve/0053-Revert-hpet-accept-64-bit-reads-and-writes.patch
>  create mode 100644 debian/patches/pve/0054-Revert-hpet-place-read-only-bits-directly-in-new_val.patch
>  create mode 100644 debian/patches/pve/0055-Revert-hpet-remove-unnecessary-variable-index.patch
>  create mode 100644 debian/patches/pve/0056-Revert-hpet-ignore-high-bits-of-comparator-in-32-bit.patch
>  create mode 100644 debian/patches/pve/0057-Revert-hpet-fix-and-cleanup-persistence-of-interrupt.patch
> 
>

applied, thanks!

nit: would have moved the patches in another folder, potentially a new
dedicated hpet one, as this isn't a pve downstream adaption/extension,
but no biggie.




More information about the pve-devel mailing list