From: "Simon Martin" Subject: Re: PV guest timings Date: Wed, 27 Nov 2013 02:36:59 +0000 Message-ID: References: <1385508664.15201.49.camel@Solace> Reply-To: Simon Martin Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6326657108019929054==" Return-path: In-Reply-To: <1385508664.15201.49.camel@Solace> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Dario Faggioli Cc: Roland Heusser , Sisu Xi , Andrew Cooper , Joshua Whitehead , "xen-devel@lists.xen.org" , Drek Darkover , Nate Studer List-Id: xen-devel@lists.xenproject.org --===============6326657108019929054== Content-Type: multipart/alternative; boundary="------=_MBCEC41DB3-F183-4116-B8DE-5D909EF83FD1" --------=_MBCEC41DB3-F183-4116-B8DE-5D909EF83FD1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; format=flowed; charset=utf-8 >> >> Looking at the statistics I see that I get the expected number of >> ticks per second, however I get latencies in the range [-1ms, +25us] >> and the periods in the range of [3us, 1.02ms]. The upper bounds look >> OK, but the lower bounds are all over the place. >> >Ok. Well, I'm not super expert in that area (yet), but even for the=20 >ones >that are, I think it's pretty hard to guess what could be going on >without seeing the actual code. > >Is there any chance that you can share/show it? At least the relevant >chunks... No problems, I can share the complete code it you want, there is nothing= =20 proprietary in there yet. What's the best way to do it? Put it on=20 github? Send a tarball? >Some questions: > - "looking at the statistics", what statistics? How do you collect > them? At every cycle I compare the current time with the expected time and=20 calculate latency (time from when I expect the event to when it actually= =20 happens) and period. > - you say you get latencies in some range and periods in some other > range. It may be my fault, but I'm not sure I understand what you > mean with these two terms in this context, could you clarify? > Latency =3D difference between expected time and actual time of the event. Period =3D time between two consecutive events. >> This makes me think that I'm not the only thing using VIRQ_TIMER. I >> seem to remember that this is called nominally every 10ms by the >> Hypervisor. >> >> Is there any way to recognize the origin of the timer? >> >I'm not sure if fits your exact needs, and you probably know it=20 >already, >but, just in case, have you looked at xentrace and xenalyze? There's a >blog post that could be a nice introduction to them: >http://blog.xen.org/index.php/2012/09/27/tracing-with-xentrace-and-xenalyz= e/ > I hadn't read that. I'll look at it tomorrow (it's almost midnight=20 here). >If the exact information you're after is not among the already existing >tracepoints, it shouldn't be to hard to add one or more of those, in=20 >the >spots where you need them. > >But again, it's very hard to judge without seeing the code... I totally understand. Thanks for the effort. > >Regards, >Dario > >-- ><> (Raistlin Majere) >----------------------------------------------------------------- >Dario Faggioli, Ph.D, http://about.me/dario.faggioli >Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) > --------=_MBCEC41DB3-F183-4116-B8DE-5D909EF83FD1 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
 
  
 Looking at the statistics I see that I get the expected number= of
 ticks per second, however I get latencies in the range [-1ms,= +25us]
 and the periods in the range of [3us, 1.02ms]. The upper bounds= look
 OK, but the lower bounds are all over the place.
 
Ok. Well, I'm not super expert in that area (yet), but even for the= ones
that are, I think it's pretty hard to guess what could be going on =
without seeing the actual code.
 
Is there any chance that you can share/show it? At least the relevant=
chunks...
No problems, I can share the complete code it you want, there is nothi= ng proprietary in there yet. What's the best way to do it? Put it on github= ? Send a tarball?
 
Some questions:
 - "looking at the statistics", what statistics? How do you colle= ct
   them?
At every cycle I compare the current time with the expected time= and calculate latency (time from when I expect the event to when it actual= ly happens) and period.
 
 - you say you get latencies in some range and periods in some= other
   range. It may be my fault, but I'm not sure I unders= tand what you
   mean with these two terms in this context, could = you clarify?
 
Latency =3D difference between expected time and actual time of= the event.
 
Period =3D time between two consecutive events. 
 This makes me think that I'm not the only thing using VIRQ_TIMER= . I
 seem to remember that this is called nominally every 10ms by = the
 Hypervisor.
  
 Is there any way to recognize the origin of the timer?
 
I'm not sure if fits your exact needs, and you probably know it alread= y,
but, just in case, have you looked at xentrace and xenalyze? There's= a
blog post that could be a nice introduction to them:
 
I hadn't read that. I'll look at it tomorrow (it's almost midnight = here).
 
If the exact information you're after is not among the already existin= g
tracepoints, it shouldn't be to hard to add one or more of those, in= the
spots where you need them.
 
But again, it's very hard to judge without seeing the code...
I totally understand. Thanks for the effort.
 
 
Regards,
Dario
 
--
<<This happens because I choose it to happen!>> (Raistlin= Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http:= //about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)=
 
--------=_MBCEC41DB3-F183-4116-B8DE-5D909EF83FD1-- --===============6326657108019929054== 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.xen.org http://lists.xen.org/xen-devel --===============6326657108019929054==--