[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-newbie
Subject:    Re: Why can't an ISR cause a page fault?
From:       "sandeep lahane" <sandeep.lahane () gmail ! com>
Date:       2007-01-23 11:47:08
Message-ID: 2d51cbf80701230335w1a2a6c49o648cc3206dba372f () mail ! gmail ! com
[Download RAW message or body]

On 1/23/07, Daniel Rodrick <daniel.rodrick@gmail.com> wrote:
> > > Hi,
> > >
> > > I read that ISRs can never cause a page fault. Why is that? What would
> > > happen if an ISR tries to use a data item that has been swapped out?
>
> > Just a guess, when page fault occurs, page fault handler is invoked
> > which is another ISR. This page fault handler handler does the
> > required stuff like bringing the data in to memory etc. This
> > introduces delays , and delayes are not supposed to be there in ISR. I
> > think when a process causes a page fault, it may sleep (and ive away
> > cpu to others ! ) till the page is made availabe in memory. But I
> > think, I am just listing out the reasons why ISR 'should not' cause
> > page fault.
> >
>
> Okay let me rephrase my question:
>
> 1) I read that an ISR cannot cause a page fault. Is the statement true?
>
> 2) In the case it is true, how are situations like this handled : an
> ISR tries to use a data item that has been swapped out?
>
> 3) I have the following argument that convinces me that the statement
> is false. When an ISR causes a page fault, the page fault handler is
> invoked since its priority is higher. When it finishes the control
> goes back to ISR, just like the normal case of nested ISR execution.
> Hence an ISR can cause page fault. Is any thing wrong with this
> argument?
>
> Thanks,
>
> Dan
>

1) I read that an ISR cannot cause a page fault. Is the statement true?

->"But interrupt handlers never perform operations that could
induce page faults and thus, potentially, process switching."

Reference Chapter 4. Interrupts and Exceptions, Understanding the
Linux kernel by Daniel Bovet and Marco Cesati

2) In the case it is true, how are situations like this handled : an
> ISR tries to use a data item that has been swapped out?

-> I think the other response from me might be of some help.

3) Check your premises.
-- 

Regards,
Sandeep.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic