Re: [patch]2.4.0-test6 "spinlock" preemption patch

From: Rik van Riel (riel@conectiva.com.br)
Date: Mon Sep 11 2000 - 20:26:46 EST


On Tue, 12 Sep 2000, Andrea Arcangeli wrote:
> On Wed, 6 Sep 2000, George Anzinger wrote:
>
> >The times a kernel is not preemptable under this patch are:
> >
> >While handling interrupts.
> >While doing "bottom half" processing.
> >While holding a spinlock, writelock or readlock.
> >
> >At all other times the algorithm allows preemption.
>
> So it can deadlock if somebody is doing:
>
> while (test_and_set_bit(0, &something)) {
> /* critical section */
> mb();
> clear_bit(0, &something);
> }

> The above construct it's discouraged of course when you can do
> the same thing with a spinlock but some place is doing that.

Hmmm, maybe the Montavista people can volunteer to clean
up all those places in the kernel code? ;)

cheers,

Rik

--
"What you're running that piece of shit Gnome?!?!"
       -- Miguel de Icaza, UKUUG 2000

http://www.conectiva.com/ http://www.surriel.com/

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



This archive was generated by hypermail 2b29 : Fri Sep 15 2000 - 21:00:17 EST