public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] Fwd: Bug#986371: Indeed this should work (also adding trivial test-case)
@ 2021-04-06 18:48 Chris Hofstaedtler
  2021-04-07  8:02 ` Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Hofstaedtler @ 2021-04-06 18:48 UTC (permalink / raw)
  To: pve-devel

Hi,

I believe you'll find Debian bug #986371 of interest. In Kernels
5.10+ the "guest time" accounting appears to be broken, in both
Debian and Ubuntu. See https://bugs.debian.org/986371 for further
details.

Best,
Chris



From: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Subject: Bug#986371: Indeed this should work (also adding trivial test-case)

Hi,
we had Delta in Ubuntu a long long time ago, but afaik there isn't any
delta-need for years.
To be clear, guest time as well as the guest visibility into steal
time is very useful, but there shouldn't be any lack of it in Debian.

I had a try in (an old) debian 10.1 with 5.7.0-2-amd64
And there I can see the accounting moving just fine

ubuntu@debian:~$ cat /proc/stat
cpu  196 0 259 9243 60 0 1 23 0 0
cpu0 82 0 172 4579 39 0 1 10 0 0
qemu-system-x86_64 -nodefaults -nographic -accel kvm
# wait a few seconds, and then abort it
ubuntu@debian:~$ cat /proc/stat
cpu  213 0 283 10926 73 0 4 32 7 0
cpu0 98 0 193 5397 52 0 3 15 7 0
cpu1 115 0 90 5528 20 0 0 16 0 0

The 7 seconds of boring some rom startup code is the accounting that
you are looking for.

Also as you can see in [1] there isn't any architecture note on this
anymore (and I think there only was for steal time). So it really
should work and does so in my experiment above.
The original change is even in the history git pre 2.6.12 and the
latter modifications are not new wither [2][3]

I was updating and rebooting into 5.10.0-5-amd64 and I can confirm
that it no longer works.
(The same experiment as above)

I've looked at the Ubuntu kernels for groovy [4] and hirsute [5], but
found no related Delta on a quick check. IIRC the last upstream change
[6] in that area was around v5.5 - so there should be no change.

IMHO a kernel bug would be appropriate, @mjt I think you could even
just re-target this one, there is no need to make it a different bug.
@Thomas if instead you want to file a new bug, then look at [7]

[1]: https://www.kernel.org/doc/html/latest/filesystems/proc.html#miscellaneous-kernel-statistics-in-proc-stat
[2]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ce0e7b28
[3]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c574358e
[4]: https://kernel.ubuntu.com/git/ubuntu/ubuntu-groovy.git/
[5]: https://kernel.ubuntu.com/git/ubuntu/ubuntu-hirsute.git/
[6]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5720821b
[7]: https://wiki.debian.org/DebianKernelReportingBugs




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [pve-devel] Fwd: Bug#986371: Indeed this should work (also adding trivial test-case)
  2021-04-06 18:48 [pve-devel] Fwd: Bug#986371: Indeed this should work (also adding trivial test-case) Chris Hofstaedtler
@ 2021-04-07  8:02 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2021-04-07  8:02 UTC (permalink / raw)
  To: Proxmox VE development discussion, Chris Hofstaedtler

Hi,

On 06.04.21 20:48, Chris Hofstaedtler wrote:
> I believe you'll find Debian bug #986371 of interest. In Kernels
> 5.10+ the "guest time" accounting appears to be broken, in both
> Debian and Ubuntu. See https://bugs.debian.org/986371 for further
> details.
> 

Thanks for sharing, appreciated! I'll keep an eye on that bug and potential
fixes like "KVM: X86: Properly account for guest CPU time when considering
context tracking" [0].

cheers,
Thomas

[0]: https://lore.kernel.org/kvm/1617011036-11734-1-git-send-email-wanpengli@tencent.com/




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-07  8:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-06 18:48 [pve-devel] Fwd: Bug#986371: Indeed this should work (also adding trivial test-case) Chris Hofstaedtler
2021-04-07  8:02 ` Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal