lkml.org 
[lkml]   [2007]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject2.6.20.3-rt8 - DMA suffers excessive delay periodically
Hello everyone,

I'm runnning 2.6.20.3 patched with -rt8 (and glibc 2.3.6).
http://people.redhat.com/mingo/realtime-preempt/older/patch-2.6.20-rt8

I've written a program to highlight a phenomenon I don't understand.

This system includes a PCI board that provides data at ~38 Mbit/s.
I request data in lumps of 1316 bytes.
In other words, a new request should complete every 277 µs.

However, if I time stamp each packet as soon as I receive it, I notice
that almost exactly every 2 seconds, the packet is received 30-100
microseconds late.

(The system is otherwise idle while I run my test.)

Now, I know that this is not a hard real-time system, so it's not the
delay per se that I find confusing. What I don't understand, is why the
delay happens periodically.

My application runs as a SCHED_RR task with priority 80. As far as I
understand, this is even higher priority than the softirq handlers.

Is there something with an even higher priority that could delay the
delivery of my data?

The other possibility is that the delivery of the data itself is
delayed. I don't understand PCI and DMA. Is it possible that the DMA
request is delayed by something?

I've provided my test case. cf strange_delays.cxx
I've also provided the output of a long run of the test case.

The driver source code is available here:
http://www.dektec.com/Products/LinuxSDK/Downloads/LinuxSDK.zip

AFAIU, they use DMA to transfer data from the board's SDRAM to my
system's RAM.

Regards.
\
 
 \ /
  Last update: 2007-03-27 18:35    [W:0.102 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site