From: Thomas Gleixner <email@example.com> To: Sean Christopherson <firstname.lastname@example.org>, Michael Tokarev <email@example.com> Cc: Paolo Bonzini <firstname.lastname@example.org>, email@example.com, firstname.lastname@example.org Subject: Re: Commit "x86/kvm: Move context tracking where it belongs" broke guest time accounting Date: Thu, 08 Apr 2021 15:18:23 +0200 [thread overview] Message-ID: <email@example.com> (raw) In-Reply-To: <YGzW/Pa/p7svg5Rr@google.com> On Tue, Apr 06 2021 at 21:47, Sean Christopherson wrote: > On Tue, Apr 06, 2021, Michael Tokarev wrote: >> broke kvm guest cpu time accounting - after this commit, when running >> qemu-system-x86_64 -enable-kvm, the guest time (in /proc/stat and >> elsewhere) is always 0. >> >> I dunno why it happened, but it happened, and all kernels after 5.9 >> are affected by this. >> >> This commit is found in a (painful) git bisect between kernel 5.8 and 5.10. > > Yes :-( > > There's a bugzilla and two proposed fixes. I don't particularly like > either of the fixes, but an elegant solution hasn't presented itself. > > Thomas/Paolo, can you please weigh in? > >  https://bugzilla.kernel.org/show_bug.cgi?id=209831 >  https://firstname.lastname@example.org >  https://email@example.com All of the solutions I looked at so far are ugly as hell. The problem is that the accounting is plumbed into the context tracking and moving context tracking around to a different place is just wrong. I think the right solution is to seperate the time accounting logic out from guest_enter/exit_irqoff() and have virt time specific helpers which can be placed at the proper spots in kvm. Thanks, tglx
next prev parent reply other threads:[~2021-04-08 13:19 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-06 20:17 Michael Tokarev 2021-04-06 21:47 ` Sean Christopherson 2021-04-08 13:18 ` Thomas Gleixner [this message] 2021-04-09 2:14 ` Wanpeng Li 2021-04-09 8:13 ` Wanpeng Li 2021-04-09 9:19 ` Thomas Gleixner 2021-04-07 11:01 ` Wanpeng Li 2021-04-13 10:48 ` Wanpeng Li
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 \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --subject='Re: Commit "x86/kvm: Move context tracking where it belongs" broke guest time accounting' \ /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
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).