Re: MM deadlock [was: Re: arca-vm-8...]

MOLNAR Ingo (mingo@chiara.csoma.elte.hu)
Tue, 12 Jan 1999 16:22:39 +0100 (CET)


On Tue, 12 Jan 1999, Alan Cox wrote:

> > The problem is that "owner" can be stale, and can be updated outside the
> > semaphore spinlock by a successful down() - which means that there are no
> > synchronizing primitives there to guarantee that the slow part sees the
> > new owner.
>
> The only instruction I can see that can adjust both the count and owner
> together is cmpxchg8, and I don't see a good way to use it.

we dont have to handle count and owner atomically across all CPUs. We have
to guarantee critical section atomicity, and we have to guarantee that
recursive down()'s are properly resolved _iff_ we are the 'owner' of the
lock. But this is only relevant to the 'owner'. (thus it doesnt have to be
atomic, only it has to be within the critical section)

Ingo

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