Re: Sleeping in the interrupt handler

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

 



On Tue, Jul 01, 2003 at 06:22:29PM +0200, Martin Maletinsky wrote:
> I know, that you are not allowed to sleep in an interrupt handler. How
> ever I am interested to understand the reason(s) for that. Was this
> a design decision (e.g. to simplify things) for the Linux kernel, or
> is there a fundamental reason that makes sleeping interrupt handlers
> simply impossible? What about the page fault handler - it (probably)
> sleeps when it has to swap in a page, why is it possible to sleep for
> the page fault handler and not for an interrupt handler?

Sleeping is implemented using scheduler. Scheduler only schedules tasks
(design decision to keep it simple). So you need a task context to sleep
in. Interrupt is not tied to a process (and uses stack of whichever
happens to be scheduled) so it can't use the context because it does not
have to be in a sane state.

-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb@ucw.cz>
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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