Re: Page faults in interrupt context

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

 



On 17-11-07 05:56, Peter Teoh wrote:

As far as I know, interrupt handlers are entered with interrupts disabled. Does this mask page faults?

Yes, page faults is masked out with interrupt disabling, as it is not a
NMI.

Correction -- no. Page faults are exceptions, not interrupts. Exceptions and interrupts are handled much the same but the interrupt-enable flag has no influence on them whatsoever.

Moreover, unless you install your interrupt handler as a fast handler (by passing the IRQF_DISABLED flag) only your _own_ interrupt is disabled (in the interrupt controller) but not all others.

If so, what happens when the kernel faults on swapped-out pages within interrupts?

You get a scary "scheduling while atomic" message in the kernel log. In atomic context, which is the context you're in inside an interrupt handler, you must never do things which can cause you to sleep including accessing memory which could be swapped out -- which fortunately does not include any kernel-space memory.

Rene.


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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