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: Wed, 27 Nov 2013 00:31:04 +0100	[thread overview]
Message-ID: <1385508664.15201.49.camel@Solace> (raw)
In-Reply-To: <emabaa7f1e-9ea7-4531-a931-b435886af133@smartin-alien>


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

On mar, 2013-11-26 at 14:50 +0000, Simon Martin wrote:
> Hi all,
>  
Hi Simon!

> I have finally got my little PV guest running. My critical error was
> not setting __XEN_INTERFACE_VERSION__. After tearing to pieces the
> code and put it back together a few times I decided to debug my
> Makefile script comparing it to Mini-OS.
>  
Cool! :-)

> I am now starting to do some simple timings and the numbers are so bad
> I'm wondering what could be wrong with my test. 
>
Not so cool! :-(
 
> As mentioned previously I have created a CPU pool with one CPU and one
> domU. I am using the standard credit scheduler. I set timer_slop=0 on
> the Xen command line.
>  
> I initialise console, traps, events, and TSC clock in my PV and then
> start a periodic operation running. I then calculate latency as (clock
> time - deadline) and period as (clock time - previous deadline).At the
> moment I'm just displaying min/max values. I also increment a tick
> count on every cycle.
>  
> 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... Some questions:
 - "looking at the statistics", what statistics? How do you collect 
   them?
 - 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?
 
> 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 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-xenalyze/

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 the
spots where you need them.

But again, it's very hard to judge without seeing the code...

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

  parent reply	other threads:[~2013-11-26 23:31 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 [this message]
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
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=1385508664.15201.49.camel@Solace \
    --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).