From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joanna Rutkowska Subject: Re: A clocksource question Date: Thu, 11 Mar 2010 11:49:30 +0100 Message-ID: <4B98CABA.3000006@invisiblethingslab.com> References: <4B962748.90609@invisiblethingslab.com> <4B96DB69.10101@goop.org 4B981997.4030605@invisiblethingslab.com> <56cc3abf-21f6-4178-b00e-0331538080d9@default> <4FA716B1526C7C4DB0375C6DADBC4EA3554D53F1B0@LONPMAILBOX01.citrite.net> <4B983EC9.2030105@invisiblethingslab.com> <4B98421F.7040102@goop.org> <4B984533.9030402@invisiblethingslab.com> <4B9877CA.4060204@goop.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1722222531==" Return-path: In-Reply-To: <4B9877CA.4060204@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: Ian Pratt , "xen-devel@lists.xensource.com" , Dan Magenheimer List-Id: xen-devel@lists.xenproject.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --===============1722222531== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigBA432AE6F01044FFBA56F485" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigBA432AE6F01044FFBA56F485 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 03/11/2010 05:55 AM, Jeremy Fitzhardinge wrote: > On 03/10/2010 05:19 PM, Joanna Rutkowska wrote: >> On 11/03/2010 02:06, Jeremy Fitzhardinge wrote: >> =20 >>> On 03/10/2010 04:52 PM, Joanna Rutkowska wrote: >>> =20 >>>> BTW, how does the clocksource=3Djiffies work on a pvops kernel in Do= m0? >>>> >>>> =20 >>> Not very well. clocksource=3Djiffies just sets up timer interrupts a= t >>> approx 100ms intervals and assumes that's 100ms. You get very low re= s >>> timers and timekeeping. >>> >>> =20 >> So, how to explain that there is no wallclock drift *at all*, even in = a >> long run -- uptime of a few days, in Dom0, when it uses the jiffies >> source? >> =20 >=20 > You said earlier that you were seeing clock drift with > clocksource=3Djiffies in dom0. >=20 Correct, sorry. With jiffies I do get a wallclock drift, yes. >> Anyway, I assume that the "xen" clock source is much more fine grained= >> (1ms?) >=20 > The xen clocksource has nanosecond resolution. But clocksources are > different from event sources, and so the ns resolution of time > measurement doesn't have much relationship to the timer precision (whic= h > is always going to use the xen event source, which is also ns > resolution, but it will tend to fold together timer events which are > closer than 50us). >=20 >> and so, maybe my kbd hiccups are caused by some code executed by >> the timer interrupt too frequently (maybe too much code executes per >> each timer interrupt, because of some other bug)? Just a though... >> =20 >=20 > Possibly, but doesn't seem too likely. Can you tell if your hiccups ar= e > accompanied by bursts of timer interrupts in /proc/interrupts? >=20 > There is another possibility, which is that the scheduler is getting > confused by xen's scheduler clock. Rather than just scheduling based o= n > real time, we try to take into account time stolen from a vcpu so that > it isn't credited against the process (which may have had all its time > stolen by another domain). But that could just be confusing things. >=20 > Does this help? >=20 > diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c Will build a new kernel with this and let you know. j. --------------enigBA432AE6F01044FFBA56F485 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iEYEARECAAYFAkuYyroACgkQORdkotfEW86t/ACg2sbPisr0Uw6D0V5bTf9Y7+sL 2eEAniLH6GhHEsgXtMzuSIRNDXRy8lzo =74fd -----END PGP SIGNATURE----- --------------enigBA432AE6F01044FFBA56F485-- --===============1722222531== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1722222531==--