LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 06-12-2006, 02:35 AM   #1
mohtashami
LQ Newbie
 
Registered: Oct 2005
Posts: 19

Rep: Reputation: 0
Question lost interrupt when using spin_lock_irq()


Just a simple question :

Do we have lost all intrrupts between spin_lock_irq-->spin_unlock_irq?
(or after spin_unlock_irq we get all of them ?)
 
Old 06-12-2006, 08:52 AM   #2
ghatamos
Member
 
Registered: Nov 2003
Posts: 35

Rep: Reputation: 15
try this link, this might be able to help you some:
http://www.ussg.iu.edu/hypermail/lin...06.2/0310.html
 
Old 06-14-2006, 02:32 AM   #3
mohtashami
LQ Newbie
 
Registered: Oct 2005
Posts: 19

Original Poster
Rep: Reputation: 0
I see that but it wasnt helpful.
I want to know what happen to all hardware interrupts during spin_lock_irq to spin_unlock_irq ? obviously during these macros ISR will not called but i want to know is there a queue (or some thing else) that stores these interrupts ?
 
Old 06-14-2006, 03:27 AM   #4
jineshkj
Member
 
Registered: Apr 2006
Distribution: Fedora
Posts: 33

Rep: Reputation: 15
even if irq's are disabled, i think the interrupt controller will still have the status within. so that, as soon as the interrupts are enabled for the processor, the controller will deliver those ones. the order in which the interrupts are delivered to the processor should also be configurable, may be by assigning priority for them in the interrupt controller.

note that the above are all my assumptions...
 
Old 06-15-2006, 01:07 PM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,673
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
When you disable IRQs, then the particular CPU on which you are running will not accept any interrupts (other than NMI = Non-Maskable Interrupt) until interrupts are re-enabled.

Any other CPU in the machine, whose IRQs are not disabled, can still receive interrupts.

The actual servicing of hardware interrupts is controlled by a chip (probably part of the processor now) called an APIC, which prioritizes and remembers the various incoming interrupt-requests, deciding which one should next be presented to the CPU. Disabling IRQs simply prevents the APIC from delivering any interrupts (other than NMI) to that CPU; it does not prevent those interrupt-requests from accumulating.

When the CPU enables IRQs again, the APIC will begin delivering interrupts to it again.

So... a hardware device doesn't have direct access to "the" interrupt request line: it presents its signal to the APIC(s), which brokers the request to the CPU(s) according to the interrupt-enablement status of the CPU(s) and the priority of simultaneously-occurring interrupt requests.

But please note that a hardware device will typically present an interrupt request to the hardware only for a limited amount of time. "You snooze, you lose!" If you do not accept and service the interrupt within that time, the interrupt can be withdrawn and therefore 'lost.'

Different types of CPU hardware have different designs and different names for their interrupt-controller hardware, but every system necessarily has one (or several).

Last edited by sundialsvcs; 06-15-2006 at 01:10 PM.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Lost Interrupt issue gnumantsc SUSE / openSUSE 3 05-31-2006 01:59 PM
hdc: lost interrupt sybille Slackware 2 06-18-2005 11:23 AM
Lost interrupt dwhite Mandriva 2 08-10-2004 05:43 AM
hdd: lost interrupt decapman Linux - Hardware 0 12-30-2003 04:07 PM
Lost Interrupt sandbag Linux - Hardware 3 08-03-2003 05:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 06:02 PM.

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