From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rik van Riel Subject: Re: vtime accounting Date: Fri, 24 Mar 2017 11:04:38 -0400 Message-ID: <1490367878.28917.2.camel@redhat.com> References: <20170308105700.GA109453@lvm> <20170313162259.GE18298@potion> <20170314082601.GC1277@cbox> <20170314165858.GA5435@potion> <20170314183913.GF1277@cbox> <20170314202721.GD5432@potion> <20170315084303.GJ1277@cbox> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Cc: Christoffer Dall , Paolo Bonzini , kvm@vger.kernel.org, Marc Zyngier , fweisbec@redhat.com To: Christoffer Dall , Radim =?UTF-8?Q?Kr=C4=8Dm=C3=A1=C5=99?= Return-path: Received: from mx1.redhat.com ([209.132.183.28]:39058 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756898AbdCXPEr (ORCPT ); Fri, 24 Mar 2017 11:04:47 -0400 In-Reply-To: <20170315084303.GJ1277@cbox> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, 2017-03-15 at 09:43 +0100, Christoffer Dall wrote: > Yes, I think the key is whether you end up taking a timer interrupt > before or after switchign PF_VCPU.  So you can spend X jiffies in the > guest, come back, change PF_VCPU (timer still hasen't expired), and > then > the timer expires immediately afterwards, and the whole block of > jiffies > that are incremented as a result of the timer gets accounted as > kernel > time. > > (Note that jiffies on clocksourced architectures is an arbitrary > number, > which somehow scales according to the clocksource frequency, > depending > on the CONFIG_HZ, so a single timer interrupt can increment jiffies > by > more than 1. > That really should not happen with nohz_full. The housekeeping CPU should get a timer interrupt every jiffy, unless something changed recently that I am not aware of. Frederic, am I totally off base?