xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Dario Faggioli <dario.faggioli@citrix.com>
To: Simon Martin <smartin@milliways.cl>
Cc: Roland Heusser <heusserr@mail.gvsu.edu>,
	Sisu Xi <xisisu@gmail.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Joshua Whitehead <whitehej@mail.gvsu.edu>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Drek Darkover <wackerei@gmail.com>,
	Nate Studer <nate.studer@dornerworks.com>
Subject: Re: PV guest timings
Date: Thu, 28 Nov 2013 12:16:40 +0100	[thread overview]
Message-ID: <1385637400.20797.84.camel@Abyss> (raw)
In-Reply-To: <em8f7250af-f445-43f0-b98a-97d1add123b2@smartin-alien>


[-- Attachment #1.1: Type: text/plain, Size: 3684 bytes --]

On mer, 2013-11-27 at 13:00 +0000, Simon Martin wrote:
 ------ Original Message ------
> From: "Dario Faggioli" <dario.faggioli@citrix.com>

> > > 
> > Well, I think a repo somewhere would be preferrable over a tarball, 
> > espacially if you have it in a (although private) repo already, so
> > that 
> > we gt to see the history, the commit changelogs, etc. 
> Here's the URL. https://github.com/FurryFuttock/micro-pv. There is no
> commit history as I mostly use SVN. I just created this and will keep
> it up to date as I carry on playing with it.
>
Once more, thanks for this. It looks really interesting and, if you ask
me, I'll sure it will be useful!

I took a quick look at it, and added to my TODO list to properly look
into it. Hopefully, it won't take that long. :-)

> > Sure, that part I got. I was more asking how you get these numbers
> > out, 
> > i.e., you print them online, store somewhere and print later/on
> > request, 
> > etc. (I guess I could have specified this more clearly, sorry about 
> > that :-) ) 
> Here's an example. There are 2 lines per sample. Line 0 has format
> <time> <ticks per second>, line 1 has <latency min/max>,<period
> min/max>
>  
> timeofday=12:56:41 - 1000
> 1043,47287,955121,2001800
> timeofday=12:56:42 - 1000
> 1024,30989,970082,2000885
> timeofday=12:56:43 - 1000
> 1042,30888,970167,2000947
> ...
>
Ok, I was wondering whether, e.g., the printing could interfere with the
measurements, and stuff like that, but I checked this out in your code,
and it doesn't look like it is happening.

> > Ok, I think I see now. Just to confirm that I do, this means that
> > the 
> > values/ranges you get by measuring both are related, i.e., not 
> > completely independent, right? Again, I'm not saying it's not useful
> > to 
> > have both, just trying to double check I understood what you're
> > doing. 
> They're not really related. Period is time between events, Latency is
> time from event to handler.
>
"Period is time between events", what events? I was thinking the events
to be two subsequent invocation of the handler. In an ideal world, that
would be exactly equal to the PERIOD that you choose, which also mean
latency would be 0. OTOH, if you get some latency in invoking the
handler, you'll see different values for the actual time difference
between different invocations... Otherwise, how could period vary over
time?

I mean, if at t0 you set the next event to occur at

 t1=t0+T,

still in the ideal world, you'll get the event both triggered and
handled exactly at t1, i.e.,

 period: p1=t0+T-t0=T,
 latency: l1=t1-t1=0.

If, OTOH, you get some latency, i.e., you are processing the event in
the handler at

 t1'=t0+T+l1,

that means

 latency: t1'-t1=t0+T+l1-t0-T=l1,

and that also makes the distance between the two handling event

 p1'=t1'-t0=t0+T+l1-t0=T+l1.

Going further on, you get

 t2=t1+T=t0+T+T=t0+2T
 t2'=t2+l2

and thus

 p2'=t2'-t1'=t0+2T+l2-t0-T-l1=T+l2-l1

That's what I meant with "related".

Checking the code (but very quickly, so bear with me if I'm getting
something wrong), _BUT_, I totally understand that this relationship is
only useful if you perform the calculation a bit differently, and the
way you're doing them allows you to monitor both latency and jitter good
enough anyway, so I'm cool with it. :-)

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)


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2013-11-28 11:16 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-14 21:18 VCPUOP_set_periodic_timer Simon Martin
2013-11-14 21:39 ` VCPUOP_set_periodic_timer Andrew Cooper
2013-11-15 11:24   ` VCPUOP_set_periodic_timer Simon Martin
2013-11-15 11:36     ` VCPUOP_set_periodic_timer Keir Fraser
2013-11-15 11:45       ` VCPUOP_set_periodic_timer Simon Martin
2013-11-15 11:56         ` VCPUOP_set_periodic_timer Keir Fraser
2013-11-15 12:37           ` VCPUOP_set_periodic_timer Simon Martin
2013-11-15 13:10             ` VCPUOP_set_periodic_timer Keir Fraser
2013-11-15 13:13               ` VCPUOP_set_periodic_timer Andrew Cooper
2013-11-15 13:39                 ` VCPUOP_set_periodic_timer Keir Fraser
2013-11-15 11:41     ` VCPUOP_set_periodic_timer Andrew Cooper
2013-11-15 12:02       ` VCPUOP_set_periodic_timer Simon Martin
2013-11-15 12:17         ` VCPUOP_set_periodic_timer Andrew Cooper
2013-11-15 12:46           ` VCPUOP_set_periodic_timer Nate Studer
2013-11-15 12:52             ` VCPUOP_set_periodic_timer Andrew Cooper
2013-11-15 12:54             ` VCPUOP_set_periodic_timer George Dunlap
2013-11-15 21:10       ` VCPUOP_set_periodic_timer Dario Faggioli
2013-11-16 20:37         ` VCPUOP_set_periodic_timer Simon Martin
2013-11-18 18:28           ` VCPUOP_set_periodic_timer Dario Faggioli
2013-11-26 14:50             ` PV guest timings Simon Martin
2013-11-26 15:11               ` Keir Fraser
2013-11-26 15:38                 ` Simon Martin
2013-11-26 23:33                   ` Dario Faggioli
2013-11-27  2:32                     ` Simon Martin
2013-11-27  8:46                       ` Dario Faggioli
2013-11-27 12:04                         ` Simon Martin
2013-11-27 10:38                   ` David Vrabel
2013-11-27 14:07                     ` Simon Martin
2013-11-26 23:31               ` Dario Faggioli
2013-11-27  2:36                 ` Simon Martin
2013-11-27  8:56                   ` Dario Faggioli
2013-11-27 13:00                     ` Simon Martin
2013-11-28 11:16                       ` Dario Faggioli [this message]
2013-11-28 11:57                         ` Simon Martin

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=1385637400.20797.84.camel@Abyss \
    --to=dario.faggioli@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=heusserr@mail.gvsu.edu \
    --cc=nate.studer@dornerworks.com \
    --cc=smartin@milliways.cl \
    --cc=wackerei@gmail.com \
    --cc=whitehej@mail.gvsu.edu \
    --cc=xen-devel@lists.xen.org \
    --cc=xisisu@gmail.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).