The kernel keeps track of the time spent in userspace, kernel space and for quite a while (since 2.6.24) also guest_time.
This is accessible to userspace
a) globally via /proc/stat [1]
b) per process via /proc/<PID>/stat
But since ~5.9 this accounting is broken by [3]
The Testcase for this is simple, run any KVM guest content for example even the following without any prep is enough
$ sudo qemu-system-x86_64 -enable-kvm -nographic
That should execute at least a bit of time in the guest for startup code.
Surely, if you want anything for long term debugging you can run a full Guest and do any busy loop in the guest.
This was reported upstream to the kernel in [4] and Debian [5] and qemu [6].
AFAIK there are two suggested [8][9], but no accepted solution yet.
If it would be "only" the global counter (a) this might be prio low-to-mid, because while still inhibiting monitoring you'd at least still have the per guest counters (b). But since both are broken one has no easy means anymore to check if there is massive host-kernel (%sys) or host-userspace (%usr) overhead over the guest (%guest) anymore. Therefore (maybe due to my old perf-engineer heart) IMHO this is rather important to be fixed soon.
Best in the next possible update for Hirsute, but that might be hard. But at lest for an Hirsute based HWE kernel to Focal I'd consider this a hard blocker.
The kernel keeps track of the time spent in userspace, kernel space and for quite a while (since 2.6.24) also guest_time.
This is accessible to userspace
a) globally via /proc/stat [1]
b) per process via /proc/<PID>/stat
But since ~5.9 this accounting is broken by [3]
The Testcase for this is simple, run any KVM guest content for example even the following without any prep is enough
$ sudo qemu-system-x86_64 -enable-kvm -nographic
That should execute at least a bit of time in the guest for startup code.
Surely, if you want anything for long term debugging you can run a full Guest and do any busy loop in the guest.
This was reported upstream to the kernel in [4] and Debian [5] and qemu [6].
AFAIK there are two suggested [8][9], but no accepted solution yet.
If it would be "only" the global counter (a) this might be prio low-to-mid, because while still inhibiting monitoring you'd at least still have the per guest counters (b). But since both are broken one has no easy means anymore to check if there is massive host-kernel (%sys) or host-userspace (%usr) overhead over the guest (%guest) anymore. Therefore (maybe due to my old perf-engineer heart) IMHO this is rather important to be fixed soon.
Best in the next possible update for Hirsute, but that might be hard. But at lest for an Hirsute based HWE kernel to Focal I'd consider this a hard blocker.
[1]: https:/ /www.kernel. org/doc/ Documentation/ filesystems/ proc.txt see "1.8 Miscellaneous kernel statistics in /proc/stat" manpages. ubuntu. com/manpages/ focal/man5/ proc.5. html see "(43) guest_time %lu" /git.kernel. org/pub/ scm/linux/ kernel/ git/torvalds/ linux.git/ commit/ ?id=87fa7f3e98a 1310ef1ac1900e7 ee7f9610a038bc /bugzilla. kernel. org/show_ bug.cgi? id=209831 /bugs.debian. org/cgi- bin/bugreport. cgi?bug= 986371 /lists. gnu.org/ archive/ html/qemu- devel/2021- 04/msg00732. html
[2]: http://
[3]: https:/
[4]: https:/
[5]: https:/
[6]: https:/
[7]: https://<email address hidden>/
[8]: https://<email address hidden>/
ProblemType: Bug 5.11.0- 13-generic 5.11.0-13.14 ature: Ubuntu 5.11.0- 13.14-generic 5.11.7 esult: unknown
DistroRelease: Ubuntu 21.04
Package: linux-image-
ProcVersionSign
Uname: Linux 5.11.0-13-generic x86_64
AlsaDevices:
total 0
crw-rw---- 1 root audio 116, 1 Apr 6 12:56 seq
crw-rw---- 1 root audio 116, 33 Apr 6 12:56 timer
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay'
ApportVersion: 2.20.11-0ubuntu61
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord'
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CasperMD5CheckR
Date: Wed Apr 7 05:02:03 2021
IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig'
MachineType: HP ProLiant DL360 Gen9
PciMultimedia:
ProcFB: 0 mgag200drmfb /boot/vmlinuz- 5.11.0- 13-generic root=UUID= c941b173- e6b5-485a- a02b-8d966b8d3c 73 ro --- console= ttyS1,115200 ersions: restricted- modules- 5.11.0- 13-generic N/A backports- modules- 5.11.0- 13-generic N/A firmware. release: 2.60 bvrP89: bd01/22/ 2018:br2. 56:efr2. 60:svnHP: pnProLiantDL360 Gen9:pvr: rvnHP:rnProLian tDL360Gen9: rvr:cvnHP: ct23:cvr:
ProcKernelCmdLine: BOOT_IMAGE=
RelatedPackageV
linux-
linux-
linux-firmware 1.196
RfKill: Error: [Errno 2] No such file or directory: 'rfkill'
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 01/22/2018
dmi.bios.release: 2.56
dmi.bios.vendor: HP
dmi.bios.version: P89
dmi.board.name: ProLiant DL360 Gen9
dmi.board.vendor: HP
dmi.chassis.type: 23
dmi.chassis.vendor: HP
dmi.ec.
dmi.modalias: dmi:bvnHP:
dmi.product.family: ProLiant
dmi.product.name: ProLiant DL360 Gen9
dmi.product.sku: 780018-S01
dmi.sys.vendor: HP