linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Koehler <jenskxxx@googlemail.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-rt-users@vger.kernel.org
Subject: Re: hrtimer: interrupt took 10252 ns - meaning?
Date: Fri, 12 Aug 2016 20:48:20 +0200	[thread overview]
Message-ID: <CAL7_A_VXSgis2sKfJwgit_V5OLYx7GCSVvFr12rsm-iTF7=gMw@mail.gmail.com> (raw)
In-Reply-To: <20160812123735.zboeocbv4o5sjnwb@linutronix.de>

Thank you for explanation.

In the application running two real time threads. First one runs with
a sleep time of 2 ms and the second one with 100ms. In difference to
Hello World example from
https://rt.wiki.kernel.org/index.php/RT_PREEMPT_HOWTO the calculation
of sleep time starts always with clock_gettime. Could this cause the
problem?

while(1)
{
   //do the stuff

   clock_gettime(CLOCK_MONOTONIC, &tsleep);
   tsleep.tv_nsec += TimerThreadPeriod_ns;
   while (tsleep.tv_nsec >= NSEC_PER_SEC)
   {
      tsleep.tv_nsec -= NSEC_PER_SEC;
      tsleep.tv_sec++;
   }
   clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &tsleep, NULL);
}

How can we find the min delta for our CPU?

Jens

  reply	other threads:[~2016-08-12 18:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-13  9:16 hrtimer: interrupt took 10252 ns - meaning? Jens Koehler
2016-07-01 10:49 ` Sebastian Andrzej Siewior
2016-08-08 16:45   ` Sebastian Andrzej Siewior
2016-08-12  9:47     ` Jens Koehler
2016-08-12 12:37       ` Sebastian Andrzej Siewior
2016-08-12 18:48         ` Jens Koehler [this message]
2016-09-08 10:36         ` Jens Koehler
2016-09-08 11:37           ` Sebastian Andrzej Siewior
2016-09-12  9:16           ` Stanislav Meduna
2016-09-12 10:07             ` Sebastian Andrzej Siewior
2016-09-12 10:13               ` Stanislav Meduna
2016-09-12 10:21             ` Vasudev Kamath
  -- strict thread matches above, loose matches on Subject: below --
2016-06-01  7:46 Jens Koehler
2016-06-03 15:59 ` Sebastian Andrzej Siewior

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='CAL7_A_VXSgis2sKfJwgit_V5OLYx7GCSVvFr12rsm-iTF7=gMw@mail.gmail.com' \
    --to=jenskxxx@googlemail.com \
    --cc=bigeasy@linutronix.de \
    --cc=linux-rt-users@vger.kernel.org \
    /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).