[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20061221114013.19734840@localhost>
Date: Thu, 21 Dec 2006 11:40:13 +0100
From: Paolo Ornati <ornati@...twebnet.it>
To: "Sorin Manolache" <sorinm@...il.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: newbie questions about while (1) in kernel mode and spinlocks
On Thu, 21 Dec 2006 10:41:44 +0100
"Sorin Manolache" <sorinm@...il.com> wrote:
> while (1)
> ;
>
> in the read function of a test device driver. I expect the calling
> process to freeze, and then a timer interrupt to preempt the kernel
> and to schedule another process. This does not happen, the whole
> system freezes. I see no effect from pressing keys or moving the
> mouse. Why? The hardware interrupts are not disabled, are they? Why do
> the interrupt handlers not get executed?
Here I'm not sure. I think that interrupts are enabled and processed
correctly BUT the process cannot be Preempted because there is some
lock held (every lock will increment the preemption count).
The mouse doesn't move because X cannot be executed...
A quick test you can do is to enable CONFIG_MAGIC_SYSRQ and try with
"ALT + Stamp + B" when the system "freezes". If it reboots then
interrupts work :)
--
Paolo Ornati
Linux 2.6.20-rc1-g99f5e971 on x86_64
-
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