From: Avi Kivity Subject: Re: Re: [PATCH 3/5] x86/pvclock: add vsyscall implementation Date: Wed, 28 Oct 2009 07:52:04 +0200 Message-ID: <4AE7DC04.7080706@redhat.com> References: <4f079cd6-0872-4cb5-832b-ee6a46841192@default> <4AE739DA.20601@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4AE739DA.20601@goop.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jeremy Fitzhardinge Cc: Dan Magenheimer , Jeremy Fitzhardinge , kurt.hackel@oracle.com, the arch/x86 maintainers , Linux Kernel Mailing List , Glauber de Oliveira Costa , Xen-devel , Keir Fraser , zach.brown@oracle.com, Ingo Molnar , chris.mason@oracle.com List-Id: xen-devel@lists.xenproject.org On 10/27/2009 08:20 PM, Jeremy Fitzhardinge wrote: > On 10/27/09 10:29, Dan Magenheimer wrote: > >> Is there any way for an application to conclusively determine >> programmatically if the "fast vsyscall" pvclock is functional >> vs the much much slower gettimeofday/clock_gettime equivalents? >> >> If not, might it be possible to implement some (sysfs?) >> way to determine this, that would also be backwards compatible >> to existing OS's that don't have pvclock+vsyscall supported? >> >> > It would probably be simplest and most portable for the app to just > measure the performance of gettimeofday and see if it meets its needs. > How can you reliably measure performance in a virtualized environment? -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.