Subject: Re: SMP API things, lock debugging, etc.
To: Stefan Grefen <Stefan.Grefen@tantau.com>
From: Jason Thorpe <firstname.lastname@example.org>
Date: 07/27/1999 15:00:47
On Tue, 27 Jul 1999 23:27:08 +0200
Stefan Grefen <Stefan.Grefen@tantau.com> wrote:
> OK lets define the (S)MP semantics of spl*().
> Do we block the interrupts on the affected processor or on all processors?
It blocks the specified interrupts on the "current processor", not all.
> Only if it blocks interrupts on all processors this method prevents
CPU 0: s = splfoo(), simple_lock(foo_lock)
CPU 1: foointr (implicit splfoo), simple_lock(foo_lock) ... spins
CPU 0: finishes with foo, simple_unlock(foo_lock), splx(s)
CPU 1: acquires foo_lock, does its thing, simple_unlock(foo_lock)
Can you describe to me a situation where failing to block interrupts on
all processors will cause deadlock (cases where one wasn't careful in
designing the locking protocol for the given subsystem don't count :-)
-- Jason R. Thorpe <email@example.com>