linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: "Sarin, Suseelan" <suseelan@gmail.com>
Cc: linux-rt-users@vger.kernel.org
Subject: Re: Calculating latency using high resolution timer
Date: Wed, 9 Jun 2010 20:30:38 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.00.1006092028280.2933@localhost.localdomain> (raw)
In-Reply-To: <AANLkTinCc-TibWfphYTZtXhDh2flvrcXNW_bO3SUetyV@mail.gmail.com>

On Wed, 9 Jun 2010, Sarin, Suseelan wrote:

> Hi All,
> 
> My real-time program has a thread which needs to run at every 2ms. I
> want to calculate the latency of this thread and I am using
> clock_gettime for this. I am bit confused here that whether I can do
> this. My doubt is, if the system is loaded to the extend that an RT
> task can have considerable latency, can I trust the time read from the
> high resolution timer of the system?

Yes, it's accurate. cyclictest relies on that as well.

> Also, with these measurements, I am seeing a ~5msec latency. Is there
> a way I can exactly point out the reason for this latency?

Tracing. See cyclictest.c for how that's done.

Thanks,

	tglx

  reply	other threads:[~2010-06-09 18:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AANLkTikuWI08hHb2BdzicdEYKO4SdQlCL17gDQgqwrKz@mail.gmail.com>
2010-06-09 16:21 ` Calculating latency using high resolution timer Sarin, Suseelan
2010-06-09 18:30   ` Thomas Gleixner [this message]
2010-06-10  6:13     ` Sarin, Suseelan
     [not found]   ` <4C0FD3E4.9090304@gmail.com>
2010-06-10  6:11     ` Sarin, Suseelan

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=alpine.LFD.2.00.1006092028280.2933@localhost.localdomain \
    --to=tglx@linutronix.de \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=suseelan@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).