From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laurent Vivier Subject: Re: [PATCH 0/2][KVM] guest time accounting Date: Mon, 13 Aug 2007 17:36:07 +0200 Message-ID: <46C07A67.8060107@bull.net> References: <46BC8B39.6050202@bull.net> <46C06AFE.2050702@qumranet.com> <46C06D99.2030106@bull.net> <200708131722.43936.borntraeger@de.ibm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1062658113==" Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, linux-kernel To: Christian Borntraeger Return-path: In-Reply-To: <200708131722.43936.borntraeger-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --===============1062658113== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig39EE4D22E353FCD5405284F8" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig39EE4D22E353FCD5405284F8 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Christian Borntraeger wrote: > Am Montag, 13. August 2007 schrieb Laurent Vivier: >>>> As guest accounting is hw dependent, I think we should add a hook in= the >>>> accounting functions. >>>> =20 >>> Isn't PF_VM exactly such a hook? All the hypervisor needs to do is t= o >>> set/unset it correctly? >> In fact, no. >> >> PF_VM is used to know we have entered a virtual CPU (the hypervisor se= t it, >> the scheduler unset it on accounting) >=20 > Why not do something like the following. (This patch does not work as i= t=20 > relies on the no-existing var cputime_since_last_update, but it shows t= he=20 > idea) Yes, I think it is a really good idea, much more cleaner. But doing like that you can have cpustat->system decreasing and thus nega= tive values in "top". It is why I modify account_system_time() (see my last patch) to decrease = the value to add to system time accordingly the value we add in cpustat->gues= t, and thus system time never decreases. We cannot do that when we call account_system_time() from KVM part. Laurent --=20 ------------- Laurent.Vivier-6ktuUTfB/bM@public.gmane.org -------------- "Software is hard" - Donald Knuth --------------enig39EE4D22E353FCD5405284F8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.7 (GNU/Linux) iD8DBQFGwHpq9Kffa9pFVzwRAuC2AKC8viT2Y1Hk/RyvihaKtR67ldatMwCgoP7c 4cz9sABTHXZOD7Vdui+QuWI= =4M6j -----END PGP SIGNATURE----- --------------enig39EE4D22E353FCD5405284F8-- --===============1062658113== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ --===============1062658113== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kvm-devel mailing list kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/kvm-devel --===============1062658113==--