Subject: Re: SA i386 SMP deadlock
To: Stephan Uphoff <ups@stups.com>
From: Jason Thorpe <thorpej@wasabisystems.com>
List: port-i386
Date: 08/11/2003 08:25:24
On Sunday, August 10, 2003, at 02:37 PM, Stephan Uphoff wrote:
> cpu_switch() running on CPU B tries to acquire the scheduler lock while
> blocking all interrupts.
sched_lock must be acquired while at splsched(). So, if you're not
blocking all interrupts here, you must go to splsched() somehow.
>
> Stephan
>
>
> Index: locore.S
> ===================================================================
> RCS file: /cvsroot/src/sys/arch/i386/i386/locore.S,v
> retrieving revision 1.13
> diff -u -r1.13 locore.S
> --- locore.S 2003/08/08 20:14:06 1.13
> +++ locore.S 2003/08/10 21:20:40
> @@ -1794,7 +1794,8 @@
> cli
> cmpl $0,_C_LABEL(sched_whichqs)
> jz idle_loop
> -idle_exit:
> +idle_exit:
> + sti
> movl $IPL_HIGH,CPUVAR(ILEVEL) # splhigh
> #if defined(MULTIPROCESSOR) || defined(LOCKDEBUG)
> call _C_LABEL(sched_lock_idle)
>
>
>
-- Jason R. Thorpe <thorpej@wasabisystems.com>