[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Commit "x86/kvm: Move context tracking where it belongs" broke guest
Re: Commit "x86/kvm: Move context tracking where it belongs" broke guest time accounting
Fri, 9 Apr 2021 10:14:18 +0800
On Thu, 8 Apr 2021 at 21:19, Thomas Gleixner <firstname.lastname@example.org> wrote:
> 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://email@example.com
> >  https://firstname.lastname@example.org
> 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.
Good suggestion, I will have a try. :)