From: Christian Borntraeger Subject: Re: time command in vm Date: Wed, 3 Sep 2008 09:43:46 +0200 Message-ID: <200809030943.46904.borntraeger@de.ibm.com> References: <48B8B63F.5040603@gmail.com> <48BD6F43.4090107@cisco.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: Terry , kvm@vger.kernel.org To: "David S. Ahern" Return-path: Received: from mtagate8.uk.ibm.com ([195.212.29.141]:58562 "EHLO mtagate8.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751489AbYICHof (ORCPT ); Wed, 3 Sep 2008 03:44:35 -0400 Received: from d06nrmr1407.portsmouth.uk.ibm.com (d06nrmr1407.portsmouth.uk.ibm.com [9.149.38.185]) by mtagate8.uk.ibm.com (8.13.8/8.13.8) with ESMTP id m837hmwE124640 for ; Wed, 3 Sep 2008 07:43:48 GMT Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by d06nrmr1407.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v9.0) with ESMTP id m837hlq43555406 for ; Wed, 3 Sep 2008 08:43:47 +0100 Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m837hlQe029032 for ; Wed, 3 Sep 2008 08:43:47 +0100 In-Reply-To: <48BD6F43.4090107@cisco.com> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: Am Dienstag, 2. September 2008 schrieb David S. Ahern: > > Terry wrote: > > Hi All, > > > > When we use time command in vm, we can get 'elapsed time', 'user time' > > and 'system time'. How to explain these three times in detail? For > > example, when we have a shadow page fault, we exit from guest to host > > for handling the fault. So, this handling time should be considered in?? > > > > I believe the time spent within kvm handling faults and such for the > guest shows up as system time to the guest. > > david It depends on the time accounting. Systems with CONFIG_VIRT_CPU_ACCOUNTING (s390 and ppc64) will account host page fault handling as steal time in the guest. guest user and guest system time remain unchanged. (Host system time will increase of course) On other systems (e.g. x86), I think the host page fault time will be accounted to either guest system or guest user, depending on where the next tick triggers accouting. elapsed time will increase on both kind of system. Christian