virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Zachary Amsden <zach@vmware.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	Rusty Russell <rusty@rustcorp.com.au>,
	"Nakajima, Jun" <jun.nakajima@intel.com>,
	virtualization <virtualization@lists.osdl.org>,
	Roland McGrath <roland@redhat.com>,
	Anthony Liguori <anthony@codemonkey.ws>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org, Jan Beulich <jbeulich@novell.com>,
	Daniel Hecht <dhecht@vmware.com>
Subject: Re: Xen & VMI?
Date: Wed, 07 Mar 2007 12:15:54 +0100	[thread overview]
Message-ID: <1173266155.24738.613.camel@localhost.localdomain> (raw)
In-Reply-To: <45EE8315.3020800@vmware.com>

On Wed, 2007-03-07 at 01:17 -0800, Zachary Amsden wrote:
> Ingo Molnar wrote:
> > For example, VMI_CALL_SetAlarm takes a 'cycles' argument. Cycles is a 
> > quite bad unit for an API, it should be absolute time, nanosec or 
> > picosec based instead. We could easily see CPUs that have /no concept of 
> >   
> 
> Actually, putting the unit in terms of cycles is more portable and 
> flexible.  Rather than perform a conversion from cycles to 
> nano/femto/pico seconds, the raw cycle count is exposed, along with the 
> current clock frequency.  This allows the timer infrastructure to merely 
> do one conversion, from cycles to real time, rather than converting to 
> an arbitrary time unit which may change with operating systems and time 
> and thus break the ABI.

Putting the unit in terms of cycles is just ugly. Virtual hardware
should provide the easiest interface and in case of time this _IS_
nanoseconds. 

nanoseconds is neither an arbitrary time unit nor will it change anytime
soon to femtoseconds. So your argument that the ABI might break is just
a strawman.

The cycles conversion gets ugly as hell, as you want to have absolute
time for your clock event reprogramming. This requires 128 bit math in
the reprogramming path for nothing and I'm not going to put it there.

Even worse on a Linux host we would convert ktime_t to some virtual
hardware clock on the guest side, feed it through paravirt to the host
and convert it back to ktime_t as the host uses an hrtimer to schedule
the next guest event.

The whole rush of paravirt ops leads to an arbitrary number of virtual
clock source and clock event devices instead of having one virtual
silicon with a sane design and a per hypervisor backend. Paravirtualized
kernels should provide _sane_ silicon emulations rather than dumping
more crap on the kernel developers by competing with the real silicon
vendors for the BDHA (Brain Damaged Hardware Award).

	tglx

  reply	other threads:[~2007-03-07 11:15 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20070305120631.GA14105@elte.hu>
2007-03-05 13:28 ` [patch] paravirt: VDSO page is essential Rusty Russell
2007-03-05 13:38   ` Ingo Molnar
2007-03-05 14:34   ` Andi Kleen
2007-03-05 13:48     ` Ingo Molnar
2007-03-05 20:11     ` Zachary Amsden
2007-03-05 20:16       ` Andi Kleen
2007-03-05 20:33         ` Zachary Amsden
2007-03-05 20:19       ` Ingo Molnar
2007-03-05 20:42         ` Zachary Amsden
2007-03-06  0:57   ` Rusty Russell
2007-03-06  1:03     ` Zachary Amsden
2007-03-06  1:11       ` Rusty Russell
2007-03-06  1:14       ` Jeremy Fitzhardinge
2007-03-06  1:51         ` Zachary Amsden
2007-03-06  1:53           ` Jeremy Fitzhardinge
2007-03-06  8:19             ` Xen & VMI? Ingo Molnar
2007-03-06  8:37               ` Gerd Hoffmann
2007-03-06  8:48                 ` Zachary Amsden
2007-03-06  8:52                 ` Ingo Molnar
2007-03-06  9:03                   ` Zachary Amsden
2007-03-06  9:10                     ` Ingo Molnar
2007-03-06  9:15                   ` Gerd Hoffmann
2007-03-06  9:34                     ` Ingo Molnar
2007-03-06 10:15                       ` Gerd Hoffmann
2007-03-06 10:26                         ` Ingo Molnar
2007-03-06 11:04                           ` Gerd Hoffmann
2007-03-06 11:59                             ` Ingo Molnar
2007-03-06 12:34                               ` Gerd Hoffmann
2007-03-06 15:03                               ` Anthony Liguori
2007-03-06 17:17                                 ` Nakajima, Jun
2007-03-06 17:32                                   ` Anthony Liguori
2007-03-06 20:37                                   ` Ingo Molnar
2007-03-06 21:02                                     ` Jeremy Fitzhardinge
2007-03-06 21:11                                       ` Ingo Molnar
2007-03-06 21:13                                         ` Jeremy Fitzhardinge
2007-03-06 21:20                                           ` Ingo Molnar
2007-03-06 21:46                                             ` Jeremy Fitzhardinge
2007-03-06 21:35                                     ` Nakajima, Jun
2007-03-07  0:44                                     ` Rusty Russell
2007-03-07  0:54                                       ` Anthony Liguori
2007-03-07  3:06                                       ` Zachary Amsden
2007-03-07  8:15                                       ` Ingo Molnar
2007-03-07  9:17                                         ` Zachary Amsden
2007-03-07 11:15                                           ` Thomas Gleixner [this message]
2007-03-07 19:14                                         ` Dan Hecht
2007-03-06 16:27                               ` Jeremy Fitzhardinge
2007-03-06 17:11                                 ` Ingo Molnar
2007-03-06 17:33                                   ` Jeremy Fitzhardinge
2007-03-07  2:16                                   ` Zachary Amsden
2007-03-06  9:55                     ` Avi Kivity
2007-03-06 10:23                       ` Gerd Hoffmann
2007-03-06 10:31                         ` Ingo Molnar
2007-03-06 19:46                   ` Chris Wright
2007-03-06 20:30                     ` Ingo Molnar
2007-03-06 20:53                       ` Chris Wright
2007-03-06 21:03                         ` Ingo Molnar
2007-03-06 21:28                           ` Chris Wright
2007-03-07  2:35                             ` Zachary Amsden
2007-03-06  9:07               ` Jeremy Fitzhardinge
2007-03-06  9:26                 ` Ingo Molnar
2007-03-06 16:42                   ` Jeremy Fitzhardinge
2007-03-06 17:18                     ` Ingo Molnar
2007-03-06 18:04                       ` Jeremy Fitzhardinge
2007-03-06  7:35         ` [patch] paravirt: VDSO page is essential Ingo Molnar
2007-03-06  7:42           ` Zachary Amsden
2007-03-06  7:50             ` Ingo Molnar
2007-03-06 18:48             ` Jeremy Fitzhardinge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1173266155.24738.613.camel@localhost.localdomain \
    --to=tglx@linutronix.de \
    --cc=akpm@linux-foundation.org \
    --cc=anthony@codemonkey.ws \
    --cc=dhecht@vmware.com \
    --cc=jbeulich@novell.com \
    --cc=jun.nakajima@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=roland@redhat.com \
    --cc=rusty@rustcorp.com.au \
    --cc=torvalds@linux-foundation.org \
    --cc=virtualization@lists.osdl.org \
    --cc=zach@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).