LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-12-2004, 11:39 AM   #1
Rocker
Member
 
Registered: Oct 2003
Location: Atlanta, GA
Distribution: gentoo
Posts: 68

Rep: Reputation: 15
hardware interrupts using too much cpu


I'm not really sure where this post fits in, I couldn't decide between hardware and software, and I want this to be seen by as many people as possible because I need to figure this out very soon.

I have a PC-104 processor board connecting to two 8-port serial boards that each use a single IRQ. I have RS-232 loopbacks on all 16 of the ports, and run 13 polls/sec with 60-byte polls. Unfortunately, top tells me that around 20% of my cpu is being used for hardware interrupts.

I have no idea what I could change to make this better, so if anyone can offer suggestions or point me in the right direction it would be very helpful.

The kernel is 2.6.5 and 2.6.8.1, same issues with both. I cannot test with a 2.4 kernel because the drivers for these serial boards are only for 2.6.

Also, on versions of top that dont show hardware interrupt usage, top reports 100% free cpu. On these versions, I tried running
bash> cat /dev/urandom > /dev/null & top
and it showed cat taking up 99.8% cpu. On the version that showed hi, in the process listing it showed cat using 100%, but up above it showed 75% usage from system processes, and the 20% hi

Thanks
 
Old 10-12-2004, 01:15 PM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
Unless they have written some really poor interrupt handlers for the devices you are using I can't believe that is true with that timing. How exactly does top know how long you are spending in hardware interrupts? Those numbers sound pretty fishy to me. Does the system seam like it is bogged down all the time?
 
Old 10-12-2004, 02:03 PM   #3
Rocker
Member
 
Registered: Oct 2003
Location: Atlanta, GA
Distribution: gentoo
Posts: 68

Original Poster
Rep: Reputation: 15
it doesnt seem to be bogged down at all. It always seems to run very fast. I have no idea where top gets its numbers from. Could anyone tell me another possible way to get these numbers to see if maybe my problem doesnt really exist?

thanks
 
Old 10-12-2004, 03:38 PM   #4
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
Well, the reason why I ask is I have been doing a lot of work with the linux kernel these days. Timing is difficult in the best cases, and hardware interrupts are nearly impossible to accurately time, especially for a user space program. I am going to look through the top source code and see how they do it (ie what system calls, ect. they are using). I guess for now I'd say so long as you aren't having any problems with your system running terribly slow it is probably just a bad estimation.
 
Old 10-12-2004, 05:55 PM   #5
Rocker
Member
 
Registered: Oct 2003
Location: Atlanta, GA
Distribution: gentoo
Posts: 68

Original Poster
Rep: Reputation: 15
I compiled the newest version of top from unixtop.org, and it reports 100% free. The version of top that shows the "hi" stuff is from fedora core 2. No other versions, including the one I compiled today, include the "hi" reading, and only that one says that more processor time is being used
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Interrupts rhcohen Programming 5 12-21-2017 11:25 AM
Second CPU not showing in hardware monitor Wakinglimb Debian 2 09-05-2005 11:21 AM
generating hardware interrupts 03mcmt02 Linux - Software 1 04-04-2005 04:39 AM
about interrupts eshwar_ind Programming 1 02-25-2004 12:38 AM
hardware name/platform/CPU type? chinmay nautiya Linux - Software 2 08-19-2003 06:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:27 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