Subject: Re: Restartable Atomic Sequences
To: Jason R Thorpe <thorpej@wasabisystems.com>
From: Gregory McGarry <g.mcgarry@ieee.org>
List: tech-kern
Date: 07/05/2002 09:45:43
Jason R Thorpe wrote:
> It seems like RAS might be useful for other uses within libthread
> than just locking primitives for R3000.
>
> Is the code somewhere where we can peek at it? How much of it can
> be reasonably made MI? I suppose the registration function and the
> RAS list on the proc structure, and the lookup function...
Don't get your hopes up. You can only register one restartable
sequence ATM.
Simon Burge wrote:
> Is you test code available? I can try it on a variety of CPUs that have
> ll/sc.
You can find some patches and tests at:
ftp://ftp.netbsd.org/pub/NetBSD/misc/gmcgarry/ras.diff
ftp://ftp.netbsd.org/pub/NetBSD/misc/gmcgarry/locktest.tar.gz
for i386 and mips. The i386 code is crufty, but mips is better. After
looking closer at the mips code, I'm going to put my money on RAS
being faster than ll/sc. BTW, the diff is against the nathanw_sa
branch, but the changes are small and obvious if you track another
branch.
-- Gregory McGarry <g.mcgarry@ieee.org>