Re: [patch] freeing spinlock when UP.

Andrea Arcangeli (andrea@suse.de)
Wed, 29 Dec 1999 16:53:21 +0100 (CET)


On Wed, 29 Dec 1999, Mathijs Mohlmann wrote:

> In both stable and development branches of the kernel, when

That bug has nothing to do with the 2.2.x kernels. It's only a bug
inserted with the scheduler changes inserted in 2.3.29.

>happen when the kernels are compiled this __SMP__. Artur Skawina
><skawina@geocities.com> thinks this might delay servicing interrupts
>unnecessarily. (thanks Artur for your response).

It's not a performance issue but a stability issue.

The below patch is definitely necessary.

> And here's the patch against 2.3.35-pre6:
>--- linux-2.3.35-pre6/kernel/sched.c Fri Dec 10 23:57:11 1999
>+++ linux-2.3.34-post/kernel/sched.c Wed Dec 29 12:34:05 1999
>@@ -273,6 +273,7 @@
> tsk = cpu_curr(this_cpu);
> if (preemption_goodness(tsk, p, this_cpu) > 0)
> tsk->need_resched = 1;
>+ spin_unlock_irqrestore(&runqueue_lock, flags);
> #endif
> }
>

Andrea

-
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/