All of lore.kernel.org
 help / color / mirror / Atom feed
* About interrupt handler
@ 2012-02-22 15:59 cheneydeng
  2012-02-22 20:50 ` Dave Hylands
  0 siblings, 1 reply; 10+ messages in thread
From: cheneydeng @ 2012-02-22 15:59 UTC (permalink / raw)
  To: kernelnewbies

hi all,
     I'm begin to learn the Kernel and i'm reading <<Linux kernel development>>.It says "This is an important point, always keep in mind that all interrupt handler has interrupted other code(possibly even another interrupt handler on a different line)".What i am not able to understand is how a interrupt handler be interrupted ? DID NOT it uninterrupted?


------------------
best regards?
  cheneydeng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120222/13ec67b2/attachment.html 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* About interrupt handler
  2012-02-22 15:59 About interrupt handler cheneydeng
@ 2012-02-22 20:50 ` Dave Hylands
  2012-02-24  9:19   ` Kosta Zertsekel
  0 siblings, 1 reply; 10+ messages in thread
From: Dave Hylands @ 2012-02-22 20:50 UTC (permalink / raw)
  To: kernelnewbies

Hi cheneydeng,

2012/2/22 cheneydeng <cheneydeng@qq.com>:
> hi all,
> ? ? ?I'm begin to learn the Kernel and i'm reading <<Linux kernel
> development>>.It says "This is an important point, always keep in mind that
> all interrupt handler has interrupted other code(possibly even another
> interrupt handler on a different line)".What i am not able to understand is
> how a interrupt handler be interrupted ? DID NOT it uninterrupted?

It depends on the architecture and the interrupt controller being
used, and the driver code itself.

Normally, when an interrupt fires, that particular interrupt will be
masked and your own handler won't interrupt itself, but you may very
well be interrupted by other interrupts.

It is possible to arrange things so that your interrupt handler
interrupts itself, although you need to be really careful when doing
this as if your interrupt fires too quickly things can escalate out of
control pretty quickly.

-- 
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* About interrupt handler
  2012-02-22 20:50 ` Dave Hylands
@ 2012-02-24  9:19   ` Kosta Zertsekel
  2012-02-24 21:08     ` Dave Hylands
  0 siblings, 1 reply; 10+ messages in thread
From: Kosta Zertsekel @ 2012-02-24  9:19 UTC (permalink / raw)
  To: kernelnewbies

>> I'm begin to learn the Kernel and i'm reading <<Linux kernel
>> development>>.It says "This is an important point, always keep in mind that
>> all interrupt handler has interrupted other code(possibly even another
>> interrupt handler on a different line)".What i am not able to understand is
>> how a interrupt handler be interrupted ? DID NOT it uninterrupted?
>
> It depends on the architecture and the interrupt controller being
> used, and the driver code itself.
>
> Normally, when an interrupt fires, that particular interrupt will be
> masked and your own handler won't interrupt itself, but you may very
> well be interrupted by other interrupts.

Can you please point out some code for explanation?
--- KostaZ

^ permalink raw reply	[flat|nested] 10+ messages in thread

* About interrupt handler
  2012-02-24  9:19   ` Kosta Zertsekel
@ 2012-02-24 21:08     ` Dave Hylands
  2012-02-24 21:18       ` Dave Hylands
  0 siblings, 1 reply; 10+ messages in thread
From: Dave Hylands @ 2012-02-24 21:08 UTC (permalink / raw)
  To: kernelnewbies

Hi Kosta,

On Fri, Feb 24, 2012 at 1:19 AM, Kosta Zertsekel <zertsekel@gmail.com> wrote:
>>> I'm begin to learn the Kernel and i'm reading <<Linux kernel
>>> development>>.It says "This is an important point, always keep in mind that
>>> all interrupt handler has interrupted other code(possibly even another
>>> interrupt handler on a different line)".What i am not able to understand is
>>> how a interrupt handler be interrupted ? DID NOT it uninterrupted?
>>
>> It depends on the architecture and the interrupt controller being
>> used, and the driver code itself.
>>
>> Normally, when an interrupt fires, that particular interrupt will be
>> masked and your own handler won't interrupt itself, but you may very
>> well be interrupted by other interrupts.
>
> Can you please point out some code for explanation?

Could you be a bit more specific about what example you're looking for?

-- 
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* About interrupt handler
  2012-02-24 21:08     ` Dave Hylands
@ 2012-02-24 21:18       ` Dave Hylands
  2012-02-26 12:11         ` Kosta Zertsekel
  0 siblings, 1 reply; 10+ messages in thread
From: Dave Hylands @ 2012-02-24 21:18 UTC (permalink / raw)
  To: kernelnewbies

HI Kosta,

On Fri, Feb 24, 2012 at 1:08 PM, Dave Hylands <dhylands@gmail.com> wrote:
> Hi Kosta,
>
> On Fri, Feb 24, 2012 at 1:19 AM, Kosta Zertsekel <zertsekel@gmail.com> wrote:
>>>> I'm begin to learn the Kernel and i'm reading <<Linux kernel
>>>> development>>.It says "This is an important point, always keep in mind that
>>>> all interrupt handler has interrupted other code(possibly even another
>>>> interrupt handler on a different line)".What i am not able to understand is
>>>> how a interrupt handler be interrupted ? DID NOT it uninterrupted?
>>>
>>> It depends on the architecture and the interrupt controller being
>>> used, and the driver code itself.
>>>
>>> Normally, when an interrupt fires, that particular interrupt will be
>>> masked and your own handler won't interrupt itself, but you may very
>>> well be interrupted by other interrupts.
>>
>> Can you please point out some code for explanation?
>
> Could you be a bit more specific about what example you're looking for?

I also believe that things have changed (since I looked at this in any
detail). It seems that interrupts are now run with other interrupts
disabled.
See: http://lwn.net/Articles/364583/ and look at the IRQF_DISABLED discussion.

-- 
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* About interrupt handler
  2012-02-24 21:18       ` Dave Hylands
@ 2012-02-26 12:11         ` Kosta Zertsekel
  2012-02-26 17:53           ` Dave Hylands
  0 siblings, 1 reply; 10+ messages in thread
From: Kosta Zertsekel @ 2012-02-26 12:11 UTC (permalink / raw)
  To: kernelnewbies

On Fri, Feb 24, 2012 at 11:18 PM, Dave Hylands <dhylands@gmail.com> wrote:
> HI Kosta,
>
> On Fri, Feb 24, 2012 at 1:08 PM, Dave Hylands <dhylands@gmail.com> wrote:
>> Hi Kosta,
>>
>> On Fri, Feb 24, 2012 at 1:19 AM, Kosta Zertsekel <zertsekel@gmail.com> wrote:
>>>>> I'm begin to learn the Kernel and i'm reading <<Linux kernel
>>>>> development>>.It says "This is an important point, always keep in mind that
>>>>> all interrupt handler has interrupted other code(possibly even another
>>>>> interrupt handler on a different line)".What i am not able to understand is
>>>>> how a interrupt handler be interrupted ? DID NOT it uninterrupted?
>>>>
>>>> It depends on the architecture and the interrupt controller being
>>>> used, and the driver code itself.
>>>>
>>>> Normally, when an interrupt fires, that particular interrupt will be
>>>> masked and your own handler won't interrupt itself, but you may very
>>>> well be interrupted by other interrupts.
>>>
>>> Can you please point out some code for explanation?
>>
>> Could you be a bit more specific about what example you're looking for?
>
> I also believe that things have changed (since I looked at this in any
> detail). It seems that interrupts are now run with other interrupts
> disabled.
> See: http://lwn.net/Articles/364583/ and look at the IRQF_DISABLED discussion.

Oh, yes, it seems it does as of kernel 3.3.0. But I fail to accept the
argument...
What happens for NAPI drivers stalling the kernel - *nobody* can
interrupt them...
Is there some reliable IRQ deep dive explanation - I need one just to
wrap my mind over the issue?
Thanks,
--- KostaZ

^ permalink raw reply	[flat|nested] 10+ messages in thread

* About interrupt handler
  2012-02-26 12:11         ` Kosta Zertsekel
@ 2012-02-26 17:53           ` Dave Hylands
  0 siblings, 0 replies; 10+ messages in thread
From: Dave Hylands @ 2012-02-26 17:53 UTC (permalink / raw)
  To: kernelnewbies

Hi Kosta,

On Sun, Feb 26, 2012 at 4:11 AM, Kosta Zertsekel <zertsekel@gmail.com> wrote:
> On Fri, Feb 24, 2012 at 11:18 PM, Dave Hylands <dhylands@gmail.com> wrote:
>> HI Kosta,
>>
>> On Fri, Feb 24, 2012 at 1:08 PM, Dave Hylands <dhylands@gmail.com> wrote:
>>> Hi Kosta,
>>>
>>> On Fri, Feb 24, 2012 at 1:19 AM, Kosta Zertsekel <zertsekel@gmail.com> wrote:
>>>>>> I'm begin to learn the Kernel and i'm reading <<Linux kernel
>>>>>> development>>.It says "This is an important point, always keep in mind that
>>>>>> all interrupt handler has interrupted other code(possibly even another
>>>>>> interrupt handler on a different line)".What i am not able to understand is
>>>>>> how a interrupt handler be interrupted ? DID NOT it uninterrupted?
>>>>>
>>>>> It depends on the architecture and the interrupt controller being
>>>>> used, and the driver code itself.
>>>>>
>>>>> Normally, when an interrupt fires, that particular interrupt will be
>>>>> masked and your own handler won't interrupt itself, but you may very
>>>>> well be interrupted by other interrupts.
>>>>
>>>> Can you please point out some code for explanation?
>>>
>>> Could you be a bit more specific about what example you're looking for?
>>
>> I also believe that things have changed (since I looked at this in any
>> detail). It seems that interrupts are now run with other interrupts
>> disabled.
>> See: http://lwn.net/Articles/364583/ and look at the IRQF_DISABLED discussion.
>
> Oh, yes, it seems it does as of kernel 3.3.0. But I fail to accept the
> argument...
> What happens for NAPI drivers stalling the kernel - *nobody* can
> interrupt them...
> Is there some reliable IRQ deep dive explanation - I need one just to
> wrap my mind over the issue?

Well the kernel has the ability to use threaded irqs. This allows IRQs
to be given a proirity so you can allow one interrupt to interrupt
another or to even allow threads to interrupt interrupts.

http://lwn.net/Articles/302043/
http://www.artist-embedded.org/docs/Events/2009/OSPERT/OSPERT09-Henriques.pdf
http://elinux.org/images/e/ef/InterruptThreads-Slides_Anderson.pdf

-- 
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* About interrupt handler
@ 2012-02-23 10:46 cheneydeng
  0 siblings, 0 replies; 10+ messages in thread
From: cheneydeng @ 2012-02-23 10:46 UTC (permalink / raw)
  To: kernelnewbies

Thanks to all of you~


------------------
best regards?
  cheneydeng
 

 
 
 
------------------ Original ------------------
From:  "Zhengwang Ruan"<ruan.zhengwang@gmail.com>;
Date:  Thu, Feb 23, 2012 06:07 PM
To:  "kernelnewbies"<kernelnewbies@kernelnewbies.org>; 

Subject:  Re: About interrupt handler

 
                   
       
       
       -------- Original Message --------
       From: cheneydeng
       Sent: 2012?02?22? ??? 23?38?37?
       To: kernelnewbies
       Subject: About interrupt handler
                          hi all,
              I'm begin to learn the Kernel and i'm reading           <<Linux kernel development>>.It says "This is an           important point, always keep in mind that all interrupt           handler has interrupted other code(possibly even another           interrupt handler on a different line)".What i am not able to           understand is how a interrupt handler be interrupted ? DID NOT           it uninterrupted?
       
          
     It has more related to CPU architecture. Generally, while an     interrupt handler is being executed, the handler itself can chose to     disable or enable external interrupts (i.e, take x86 for example, IF     bit for cflags reg controls this.). If IF is enabled, then the     interrupt handler currently being executed may be interrupted and     then jump to the entry for the coming interrupt.
     
     Thanks,
         -Zhengwang
     
     
                     
         
                      ------------------
                            best regards?
                 cheneydeng
             
           
          
       
        _______________________________________________ Kernelnewbies mailing list Kernelnewbies at kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120223/50ae93f6/attachment.html 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* About interrupt handler
  2012-02-22 15:38 cheneydeng
@ 2012-02-23 10:07 ` Zhengwang Ruan
  0 siblings, 0 replies; 10+ messages in thread
From: Zhengwang Ruan @ 2012-02-23 10:07 UTC (permalink / raw)
  To: kernelnewbies




-------- Original Message --------
From: cheneydeng
Sent: 2012?02?22? ??? 23?38?37?
To: kernelnewbies
Subject: About interrupt handler
> hi all,
> I'm begin to learn the Kernel and i'm reading <<Linux kernel
> development>>.It says "This is an important point, always keep in mind
> that all interrupt handler has interrupted other code(possibly even
> another interrupt handler on a different line)".What i am not able to
> understand is how a interrupt handler be interrupted ? DID NOT it
> uninterrupted?

It has more related to CPU architecture. Generally, while an interrupt
handler is being executed, the handler itself can chose to disable or
enable external interrupts (i.e, take x86 for example, IF bit for cflags
reg controls this.). If IF is enabled, then the interrupt handler
currently being executed may be interrupted and then jump to the entry
for the coming interrupt.

Thanks,
-Zhengwang


>
> ------------------
> best regards?
> cheneydeng
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120223/ff4def83/attachment-0001.html 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* About interrupt handler
@ 2012-02-22 15:38 cheneydeng
  2012-02-23 10:07 ` Zhengwang Ruan
  0 siblings, 1 reply; 10+ messages in thread
From: cheneydeng @ 2012-02-22 15:38 UTC (permalink / raw)
  To: kernelnewbies

hi all,
     I'm begin to learn the Kernel and i'm reading <<Linux kernel development>>.It says "This is an important point, always keep in mind that all interrupt handler has interrupted other code(possibly even another interrupt handler on a different line)".What i am not able to understand is how a interrupt handler be interrupted ? DID NOT it uninterrupted?


------------------
best regards?
  cheneydeng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120222/293902fd/attachment.html 

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-02-26 17:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-22 15:59 About interrupt handler cheneydeng
2012-02-22 20:50 ` Dave Hylands
2012-02-24  9:19   ` Kosta Zertsekel
2012-02-24 21:08     ` Dave Hylands
2012-02-24 21:18       ` Dave Hylands
2012-02-26 12:11         ` Kosta Zertsekel
2012-02-26 17:53           ` Dave Hylands
  -- strict thread matches above, loose matches on Subject: below --
2012-02-23 10:46 cheneydeng
2012-02-22 15:38 cheneydeng
2012-02-23 10:07 ` Zhengwang Ruan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.