Kay Hayen wrote: > Hello Eddie, > > Am Montag 15 Oktober 2007 06:13:44 schrieb Dong, Eddie: >>> That 0.1% kills me though. do you mean, that every 1 second, 1 >>> will be 1ms >>> off? And for every second thereafter, leaving me with 1 second >>> drift after only 1000 seconds? >> >> Oh, that is not my intension :-( >> I just put a rought estimation here. In old Xen >> time, I know there are ~10-30 seconds shift after ~10 hours. > > That's about the same, isn't it? That's 30 seconds shift after 36000 > seconds and really a lot.
Yes, but you can simply solve it by sync guest time to network time per minutes for example. 0.1% shift then means at most 60ms. If 60ms is still too big, you can sync per second or per 10 second. Writting a tool in this way is pretty simple. BTW Vmware also rely on this kind of syncing. > >>> I am looking for an absolute value for time difference between >>> guest and host that is supposed to be small over longer periods. Is >>> that not achievable for a paravirtual guest?! I really need >>> gettimeofday() calls to be >>> near exactly >>> the same value for applications in guest and host even after months. >> >> Except adding a hypercall to get host time (i.e. pv timer), or >> using network time, I think cetain amount of shift will be always >> there. > > Do you consider that NTP between guest and host is acceptable? > I found this > btw: http://support.ntp.org/bin/view/Support/KnownOsIssues > > Quote: "It appears that Xen just passes time-related system > calls to the > underlying master domain, and does not require any additional > changes to > support time sync into the guest domains." Yes, but this is for pv domain only. Same issue exist for HVM domain in Xen. KVM is supporting HVM domain only using hardware features. That is why you see something different. Linux 2.6.24 is coming out with pvtimer inside which will solve this issue eventually but you need to wait some time :-) BTW, using application to sync guest time is not a big issue IMO, like VMWare did. > > When I today told my manager (technical background) about > this, it was met > with utter surprise, because "that should be really simple". > Incidentally, I recently claimed in a meeting that with modern Linux > and paravirtualization, this problem should no longer exist. Yes, you can add this kind of hypercall. I am not sure if KVM will add this APIs but certainly can. If the usage model is strong then we may provide APIs for host time etc. But this only works when you can modify your application (to do hypercall), so the best solution is still to let application sync the time periodically. thx,eddie ------------------------------------------------------------------------- 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/ _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel