From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoffer Dall Subject: vtime accounting Date: Wed, 8 Mar 2017 02:57:00 -0800 Message-ID: <20170308105700.GA109453@lvm> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, Marc Zyngier To: Paolo Bonzini Return-path: Received: from mail-wr0-f179.google.com ([209.85.128.179]:34288 "EHLO mail-wr0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753062AbdCHMsc (ORCPT ); Wed, 8 Mar 2017 07:48:32 -0500 Received: by mail-wr0-f179.google.com with SMTP id l37so22560069wrc.1 for ; Wed, 08 Mar 2017 04:48:30 -0800 (PST) Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: 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? Thanks, -Christoffer