From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH/RFC 4/4, second shot]KVM uses "account_guest_time()" Date: Fri, 17 Aug 2007 16:03:14 +0300 Message-ID: <46C59C92.40902@qumranet.com> References: <46C4719A.2060308@bull.net> <46C4720F.7030304@bull.net> <46C4725A.4070607@bull.net> <46C4740F.2050701@bull.net> <1187303955.6449.7.camel@localhost.localdomain> <46C54FB8.7050504@bull.net> <1187339450.6449.115.camel@localhost.localdomain> <46C56774.2030009@bull.net> <46C58BD5.3090207@bull.net> <46C58C8C.3080803@bull.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel , linux-kernel , virtualization To: Laurent Vivier Return-path: In-Reply-To: <46C58C8C.3080803-6ktuUTfB/bM@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 Laurent Vivier wrote: > KVM updates vtime in task_struct to allow account_guest_time() to modify user, > system and guest time in cpustat accordingly. > > --- kvm.orig/drivers/kvm/Kconfig 2007-08-17 10:24:46.000000000 +0200 > +++ kvm/drivers/kvm/Kconfig 2007-08-17 10:25:25.000000000 +0200 > @@ -41,4 +41,10 @@ > Provides support for KVM on AMD processors equipped with the AMD-V > (SVM) extensions. > > +config GUEST_ACCOUNTING > + bool "Virtual Machine accounting support" > + depends on KVM > + ---help--- > + Allows to account CPU time used by the Virtual Machines. > + Other way round. In the patch that adds account_guest_time(), have a CONFIG_GUEST_ACCOUNTING (defaulting to n, with no description, help, or dependencies. Then, CONFIG_KVM can select GUEST_ACCOUNTING. The advantages of this are: - the puppyvisor can also select this if it so wishes - we don't have core code reference some obscure module CONFIG_PREEMPT_NOTIFIERS does the same thing. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- 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/