From: dhylands@gmail.com (Dave Hylands)
To: kernelnewbies@lists.kernelnewbies.org
Subject: About interrupt handler
Date: Sun, 26 Feb 2012 09:53:06 -0800 [thread overview]
Message-ID: <CABi1daG98fXYKg0fjA8AYnvW+_vYOS8VfmHTT6YuRL1JG5mhNQ@mail.gmail.com> (raw)
In-Reply-To: <CADxo8WLmprNFQ95Ygdv6YhyZcJ0B5WJoj30RpdvUaPs+OnfECg@mail.gmail.com>
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
next prev parent reply other threads:[~2012-02-26 17:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
-- 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CABi1daG98fXYKg0fjA8AYnvW+_vYOS8VfmHTT6YuRL1JG5mhNQ@mail.gmail.com \
--to=dhylands@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).