LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-18-2009, 11:03 PM   #1
wevl
LQ Newbie
 
Registered: Jun 2008
Posts: 16

Rep: Reputation: 0
Driver Latency


Hello All:
I am working on a project which required writing a driver.
The hardware is an embedded VersaLogic PC-104 system (ISA bus).
The processor is a Pentium M, 1.6 GHz with 512 MB memory.
Operating system is Slackware 12.0 Linux with a 2.6.25.7 kernel compiled with the low latency preemptible kernel.

One of the system tasks involves operating a rotary knife device to size a product moving at 1,000 Ft. / Min. ( 200 In. / Sec). Our desired interrupt period for the driver is 62.5 uSec. generated by a counter / timer on one of the ISA I/O boards.

At times, the driver's clock interrupt may not run for >1.2 milliseconds. This doesn't happen very often and when it does happen, it has to happen at the wrong time to degrade our accuracy. But as all of you know, if it can happen, given enough time, it will happen.

How does this latency compare to what some of you may have experienced?
Any suggestions for improvement? Incidentally, running without X doesn't improve things. The latencytop utility apparently only works for user-land processes, so it didn't help.

As an aside, I have written a simulator to test the system using real-time Linux. The real-time Linux system is a 1.8 GHz Athlon that is happy running a 31.25 uSec period interrupt with ~ 15 uSec. max latency - roughly a 80x improvement. I usually use real-time Linux for something like this, but this customer didn't like the idea or at least wanted me to give a standard Linux a real good try first.

Thanks
wevl
 
Old 01-19-2009, 04:40 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,336

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
Quote:
Originally Posted by wevl View Post

At times, the driver's clock interrupt may not run for >1.2 milliseconds. This doesn't happen very often and when it does happen, it has to happen at the wrong time to degrade our accuracy. But as all of you know, if it can happen, given enough time, it will happen.
I think that this is the problem you should address. Why is the interrupt occasionally masked for 1.2 milliseconds? Is it masked in the hardware or is it masked in the kernel? If it is masked in the kernel then you need to look at what interrupt is taking 1.2 milliseconds of uninterruptable processing to clear the interrupt. Is the masking interrupt some part of your driver system or is it something completely unrelated like a system clock interrupt?

--------------------
Steve Stites
 
Old 01-21-2009, 12:26 PM   #3
wevl
LQ Newbie
 
Registered: Jun 2008
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jailbait View Post
I think that this is the problem you should address. Why is the interrupt occasionally masked for 1.2 milliseconds? Is it masked in the hardware or is it masked in the kernel?

How would one determine?

If it is masked in the kernel then you need to look at what interrupt is taking 1.2 milliseconds of uninterruptable processing to clear the interrupt.

How would one determine?

Is the masking interrupt some part of your driver system or is it something completely unrelated like a system clock interrupt?

--------------------
Steve Stites
Does anyone have any experience with non real-time Linux and driver latency expectations? 1.2 to 1.3 milliseconds may be about as good as one could expect. I just don't know.
 
Old 01-21-2009, 12:35 PM   #4
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
Read this thread and follow the links. Your questions will be answered, though you may not like the answers. Or, rather, your client may not like the answers.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NFS Latency xonogenic Linux - Server 2 12-13-2007 05:56 PM
GNOME Latency Raeth Linux - General 3 02-05-2007 05:22 PM
interrupt latency wwwrabbit Linux - Newbie 1 11-10-2006 07:29 AM
finding latency chovy Linux - Software 5 06-05-2006 08:13 PM
Latency Steve Roberts Linux - General 0 02-13-2001 09:40 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration