[Ilugc] Using scheduler queue in Interrupt Handler crashes the system
- From: arvind@xxxxxxxxxxx (Arvind R.)
- Date: Thu, 5 Feb 2004 05:22:57 +0530
On Tue, Feb 03, 2004 at 11:03:36AM -0800, Joseph Antony wrote:
You got it right. Just that, we can implement only
scheduler queue in the interrupt handler as it is the
only queue that is allowed to sleep without crashing
YOU haven't got ME! I answered you - not asked for clarification!
INTERRUPT HANDLERS CANNOT SLEEP - ANYWHERE
in their execution path. The normal meaning of interrupt-handler
is the routine that's executed to service an interrupt - primarily
the top-half. The top-half normally cleans up HW-IFs, captures
volatile data if any, and calls queue_task() to link-in the
interrupt's bottom-half into a BH_queue. The BH is run at a
time depending on the type of queue and there you can do whatever
processing ( no sleeping ) and then wake-up
the sleeping driver process and, if needed, force a re-schedule
by setting the variable 'need_resched' before exiting. Note the
absence of any blocking function in the flow.
And, queues don't sleep - they are not processes or tasks -
just data structures - inputs to the 'queue-runner' task - which
is an element in a queue of tasks pending to be run.
Other related posts: