From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: vtime accounting Date: Thu, 9 Mar 2017 09:16:11 +0100 Message-ID: <4b1e4f24-a8d4-71f0-39dd-83706b3bcf38@redhat.com> References: <20170308105700.GA109453@lvm> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: kvm@vger.kernel.org, Marc Zyngier , Rik van Riel To: Christoffer Dall Return-path: Received: from mail-wm0-f65.google.com ([74.125.82.65]:33986 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752794AbdCIIXa (ORCPT ); Thu, 9 Mar 2017 03:23:30 -0500 Received: by mail-wm0-f65.google.com with SMTP id u132so9650417wmg.1 for ; Thu, 09 Mar 2017 00:23:29 -0800 (PST) In-Reply-To: <20170308105700.GA109453@lvm> Sender: kvm-owner@vger.kernel.org List-ID: On 08/03/2017 11:57, Christoffer Dall wrote: > Hi Paolo, > > I'm looking at improving KVM/ARM a bit by calling guest_exit_irqoff > before enabling interrupts when coming back from the guest. > > Unfortunately, this appears to mess up my view of CPU usage using > something like htop on the host, because it appears all time is spent > inside the kernel. > > From my analysis, I think this is because we never handle any interrupts > before enabling interrupts, where the x86 code does its > handle_external_intr, and the result on ARM is that we never increment > jiffies before doing the vtime accounting. > > So my current idea is to increment jiffies according to the clocksource > before calling guest_exit_irqoff, but this would require some main > clocksource infrastructure changes. > > My question is: how important is the vtime accounting on the host from > your point of view? Worth poking the timekeeping folks about or even > trying to convince ourselves that the handle_external_intr thing is > worth it? Not really my area, so let's ask Rik. :) Paolo