[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+bLfK44cYvhMbrK8ZrZ0BiEo3V=FB2UavCpL1CaRgjKqtN9Yw@mail.gmail.com>
Date: Fri, 5 Oct 2012 09:51:55 +0100
From: Iain Fraser <iainkfraser@...il.com>
To: linux-kernel@...r.kernel.org
Subject: interrupt context
Hello,
I understand the interrupts and softirq's run in interrupt context (
as opposed to process context ). But what I
don't understand is why you cannot sleep in interrupt context?
What I have read it states that it doesn't have a process to schedule
out. But interrupts use the interrupted processes
kernel stack just like a syscall. So surely it is possible to sleep
using that stack. Understandably It would be unfair on the process
that blocked through no fault of its own.
Also if you are not allowed to sleep / schedule during interrupt
context. Then how does the system timer pre-empt processes by
calling schedule?
I understand there are many reasons why you shouldn't: irq lines being
disabled, quick completion, etc. But I don't understand
why you cannot.
Thanks for the help
Iain
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists