lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 27 Mar 2007 18:32:40 +0200
From:	John <linux.kernel@...e.fr>
To:	linux-kernel@...r.kernel.org
CC:	tglx@...esys.com, mingo@...e.hu, johnstul@...ibm.com,
	akpm@...l.org, linux.kernel@...e.fr, linux-apps@...r.kernel.org
Subject: 2.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.

View attachment "strange_delays.cxx" of type "text/plain" (2308 bytes)

View attachment "output.txt" of type "text/plain" (37314 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ