RE: newbie - interrupt handler problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




I'm not sure about the 'sending more interrutps than can be handled'
question.
I thought that just before the kernel enters your interrupt handler then it
turns interrupts off, but I could be wrong.

However, I do know that staying in the interrupt handler for very long is a
bad thing, and any length processing should be pushed off to the 'bottom
half handler'.

Actually, I believe the recommended way to do this in 2.4 kernel is with
'tasklets' rather than bottom half handlers.

See chapter 9 in
http://www.xml.com/ldd/chapter/book/index.html

HTH
dom


> -----Original Message-----
> From: Chandan K Shanbhag [mailto:cshanbha@students.uiuc.edu]
> Sent: Tuesday, November 12, 2002 1:56 PM
> To: kernelnewbies@nl.linux.org
> Subject: newbie - interrupt handler problems
> 
> 
> hi
> 	I am writing a patch to the 2.4.19 kernel to measure 
> statistics of
> packets sent on the n/w interfaces. I have a function that is 
> called when
> net/core/dev.c:net_rx_action() is invoked to record received
> packets.
> 	Now this works fine when small amounts of data are sent on the
> n/w. But doing a huge file transfer brings about a panic.
> 	The trace says a NULL pointer reference occured and that the
> interrupt handler was killed. The EIP
> points to an instruction in my routine (as figured from 
> System.map). I am
> checking for NULL values before I access anything.
> 	This is what I think is the problem. This routine of mine takes
> too long to be part of an interrupt handler. So, when I am 
> doing a massive
> data transfer, the device is probably sending more interrupts 
> than can be
> handled and something goes bad. Is this possible? And how do 
> I fix this.
> 
> 	OR more generally, if I have a interrupt handler which 
> takes long,
> is there some trick by which I can do less work in the 
> handler and move
> the bulk of the work somewhere else.
> 
> Thanks in advance
> Chandan
> 
> 
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux