Subject: Re: Support for atomic locks in lock.h
To: Wayne Knowles <wdk@netbsd.org>
From: Nathan J. Williams <nathanw@wasabisystems.com>
List: port-mips
Date: 11/24/2001 22:52:30
Wayne Knowles <wdk@netbsd.org> writes:

> I assume you are refering to "Optimistic" techniques as outlined in the
> paper "Fast Mutual Exclusion for Uniprocessors" available at:
> 
> http://www.cs.cmu.edu/afs/cs/project/mach/public/doc/published/Rcs.ps

Right.

> If we could control the address of the test-and-set function we can teach
> the kernel to be aware of the restartable section when it sees it in the
> PC during a context switch.

I was thinking more that the library's init routine (mmm, ELF) could
inform the kernel of the relevant address range. Doesn't scale well to
multiple libraries that want this feature, unfortunately, and it adds
goop to the userret() critical path. Perhaps my p_userret hack can be
abused into helping with this (linked list of userret actions? Hm).

        - Nathan