Re: Of locks, spinlocks and printks in schedule()

Hugo Varotto (hvarotto@cs.pitt.edu)
Tue, 27 Jul 1999 14:47:38 -0400


Stupid of me ! Thanks Steve, I didn't see that ( you won't believe how
much time I lost because of it ).

Hugo

Steve Dodd wrote:
>
> On Tue, Jul 27, 1999 at 12:31:01PM -0400, Hugo Varotto wrote:
>
> > Now, I don't know why, but it seems that if I putt a
> > printk in the schedule() routine, between the pair of
> >
> > spin_lock_irq(&runqueue_lock);
> > ...
> > spin_unlock_irq(&runqueue_lock);
> >
> > commands, the kernel crashes ( or actually, to be more precise, it
> > freezes ).
>
> Err, printk() does a
>
> wake_up_interruptible(&log_wait);
>
> __wake_up() calls wake_up_process() for each process on the wait queue, and
> this gets the runqueue_lock again.
>
> --
> We are Linux. Resistance is an indication that you missed the point.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/