From: Hollis Blanchard Date: Fri, 11 Jul 2008 15:19:54 +0000 Subject: Re: [PATCH 2/5] kvmtrace: make cycle calculation architecture aware Message-Id: <1215789594.28760.7.camel@localhost.localdomain> List-Id: References: <1215439013-11480-1-git-send-email-ehrhardt@linux.vnet.ibm.com> <4874821F.4060509@linux.vnet.ibm.com> <1215615799.22935.1.camel@localhost.localdomain> <200807101822.16163.sheng.yang@intel.com> <48760F6D.5000709@qumranet.com> <48770CEF.6090102@de.ibm.com> In-Reply-To: <48770CEF.6090102@de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: carsteno@de.ibm.com Cc: Avi Kivity , "Yang, Sheng" , kvm@vger.kernel.org, Christian Ehrhardt , xiantao.zhang@intel.com, kvm-ppc@vger.kernel.org On Fri, 2008-07-11 at 09:34 +0200, Carsten Otte wrote: > Avi Kivity wrote: > > What is the overhead of ktime_get()? > I think I'd like an arch specific timestamp. This way we could use our > clock-cycle-granularity-non-privileged-timestamp instruction ;-). If > we need a common implementation, I don't think there's much difference > between different syscalls in terms of overhead. Carsten tried to elaborate on IRC, but the summary is that a) time on S390 is complicated, and b) they have a time source that yields finer granularity than nanoseconds. So I'm inclined to say fine, we can have an arch-specific hook, and almost every arch will just use getnstimeofday(). -- Hollis Blanchard IBM Linux Technology Center