From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [RFC 0/4] KVM in-kernel PM Timer implementation Date: Tue, 14 Dec 2010 09:29:30 -0600 Message-ID: <4D078D5A.9060804@codemonkey.ws> References: <901746004.680841292328577685.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, glommer@redhat.com, zamsden@redhat.com, avi@redhat.com, mtosatti@redhat.com To: Ulrich Obergfell Return-path: Received: from mail-qy0-f174.google.com ([209.85.216.174]:58118 "EHLO mail-qy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759400Ab0LNP3e (ORCPT ); Tue, 14 Dec 2010 10:29:34 -0500 Received: by qyj19 with SMTP id 19so4934356qyj.19 for ; Tue, 14 Dec 2010 07:29:34 -0800 (PST) In-Reply-To: <901746004.680841292328577685.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 12/14/2010 06:09 AM, Ulrich Obergfell wrote: > Hi, > > This is an RFC through which I would like to get feedback on how the > idea of in-kernel PM Timer would be received. > > The current implementation of PM Timer emulation is 'heavy-weight' > because the code resides in qemu userspace. Guest operating systems > that use PM Timer as a clock source (for example, older versions of > Linux that do not have paravirtualized clock) would benefit from an > in-kernel PM Timer emulation. > > Parts 1 thru 4 of this RFC contain experimental source code which > I recently used to investigate the performance benefit. In a Linux > guest, I was running a program that calls gettimeofday() 'n' times > in a loop (the PM Timer register is read during each call). With > in-kernel PM Timer, I observed a significant reduction of program > execution time. > I've played with this in the past. Can you post real numbers, preferably, with a real work load? Regards, Anthony Liguori > The experimental code emulates the PM Timer register in KVM kernel. > All other components of ACPI PM remain in qemu userspace. Also, the > 'timer carry interrupt' feature is not implemented in-kernel. If a > guest operating system needs to enable the 'timer carry interrupt', > the code takes care that PM Timer emulation falls back to userspace. > However, I think the design of the code has sufficient flexibility, > so that anyone who would want to add the 'timer carry interrupt' > feature in-kernel could try to do so later on. > > Please review and please comment. > > > Regards, > > Uli Obergfell > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >