All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Schwebel <r.schwebel@pengutronix.de>
To: linux-rt-users@vger.kernel.org
Cc: Michael Olbrich <m.olbrich@pengutronix.de>, kiszka@rts.uni-hannover.de
Subject: jitter bursts
Date: Fri, 31 Aug 2007 17:17:27 +0200	[thread overview]
Message-ID: <20070831151727.GT23573@pengutronix.de> (raw)

Hi,

We are currently porting a userspace realtime network stack (Ethernet
Powerlink -> EPL) to RT-Preempt, in order to play with the system and
find out what is possible today with a standard linux-rt and userspace
socket based stacks.

We currently see a strange latency effect. The scenario is like this:

 +--------+  +-----------+ +-----------+
 | PC EPL |  | Second PC | | EPL Clamp |
 +--------+  +-----------+ +-----------+
      |            |            |
       \     +----------+       /
        \----|    Hub   |------/
             +----------+

EPL is a protocol where the Master (PC EPL) sends a cyclic Start-of-
Cycle packet (SoC) to the network; our cycle time is 2 ms. To make sure
we do not se effects from the stack itself, we have written a small
program which sends a packet every 2 ms via raw socket.

We have a second PC which listens to the same network; this box takes
the packet time stamps (SO_TIMESTAMP), substracts the 2 ms cycle time
since the last SoC and plots the resulting jitter:

http://www.pengutronix.de/software/realtime-preempt/20070831-network-jitter/epl-jitter-log-20070831-1.png

What we see is that most of the packet times stay within something
around 10 us. However, there are periodic jitters which exceed that
period by a huge factor; in that case the jitter is in the 200...400 us
area, and notice the systematic patterns in the plots.

The periodicity of the 200...400 us is fixed for an unchanged clock
source (18 s in this example, we have seen values up to 200 s). The
periodicy changes when the clock source is changed in

/sys/devices/system/clocksource/clocksource0/current_clocksource

Changing to another clock source and changing back changes the period,
but it is not reproducable if you change back to the same source (hpet,
acpi_pm, tsc). There is also no visible corellation between the concrete
clocksource and the period.

The periodicity is fairly precise, it varies with < 5 us.

Has anyone seen a similar effect?

Robert
-- 
Pengutronix - Linux Solutions for Science and Industry
Entwicklungszentrum Nord     http://www.pengutronix.de

             reply	other threads:[~2007-08-31 15:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-31 15:17 Robert Schwebel [this message]
2007-08-31 15:55 ` jitter bursts Girish kathalagiri
2007-09-01  9:15   ` Robert Schwebel
2007-09-05  8:14   ` Michael Olbrich
2007-09-05  8:36     ` Girish kathalagiri
2007-09-05  9:01       ` Michael Olbrich
2007-08-31 15:58 ` Bernhard Kuhn
2007-09-01  9:13   ` Robert Schwebel
2007-08-31 16:55 ` Sven-Thorsten Dietrich
2007-09-02 12:05   ` Robert Schwebel
     [not found] ` <46D92C57.3090703@osadl.org>
2007-09-01  9:19   ` jitter bursts -> Not Found Robert Schwebel

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=20070831151727.GT23573@pengutronix.de \
    --to=r.schwebel@pengutronix.de \
    --cc=kiszka@rts.uni-hannover.de \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=m.olbrich@pengutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.