CPU accounting with Linux 5.4

I just tried upgrading my hypervisor from 4.19 to 5.4, and noticed some strange issues regarding CPU accounting.

When using CONFIG_NO_HZ_IDLE, or CONFIG_NO_HZ_FULL (with kernel arguments in my case nohz_full=2-11 rcu_nocbs=2-11).
I have noticed /proc/stat has issues collecting CPU accounting information.

With plain NOHZ_FULL:

  • CPU speed from /proc/cpuinfo is not showing change in frequency, eventhough intel pstate is enabled (also tried with ACPI - same result).
  • Utilization read from /proc/stat shows 100% usage on all cores - eventough the guest isn’t doing anything.

with CONFIG_NO_HZ_IDLE:

  • CPU speed is correctly reported through /proc/cpinfo.
  • Utilization read from /proc/stat shows 100% usage on all cores - eventough the guest isn’t doing anything.

As a workaround, I can stop using NO_HZ & rcu_nocbs - but, as this OS is used ONLY for running guests, I think NO_HZ & rcu_nocbs serves a purpose here.
I could also downgrade to 4.19 again (with the exact same options), and everything works as expected. :confused:

Has anyone else seem the same issues on the 5.x series of Linux ? Or have I simply misconfigured something ?

dkvm:~# zcat /proc/config.gz | grep "NO_HZ\|RCU" |grep -v \#; cat /proc/cmdline
CONFIG_NO_HZ_COMMON=y
CONFIG_NO_HZ_IDLE=y
CONFIG_TREE_RCU=y
CONFIG_SRCU=y
CONFIG_TREE_SRCU=y
CONFIG_RCU_STALL_COMMON=y
CONFIG_RCU_NEED_SEGCBLIST=y
CONFIG_HAVE_RCU_TABLE_FREE=y
CONFIG_RCU_CPU_STALL_TIMEOUT=60
BOOT_IMAGE=/boot/vmlinuz-dkvm modules=loop,squashfs,sd-mod,usb-storage nomodeset nouveau.modeset=0 mitigations=off intel_iommu=on iommu=pt transparent_hugepage=never vfio-pci.ids=10de:13c2,10de:0fbb,1106:3483 elevator=noop default_hugepagesz=2M hugepagesz=2M isolcpus=2-11 nohz_full=2-11 rcu_nocbs=2-11