Subject: Re: sparc64 pthreads
To: ali \(Anders Lindgren\) <dat94ali@ludat.lth.se>
From: Andrey Petrov <petrov@netbsd.org>
List: port-sparc64
Date: 05/14/2002 22:56:30
On Sat, May 11, 2002 at 02:16:39AM +0200, ali (Anders Lindgren) wrote:
> Anyone know of a working pthreads implementation[0] that runs on sparc64?
> I am running a late april -current and things seem to work ok[1], but
> I find myself unable to compile a lot of stuff, i.e. anything that is
> multithreaded. :-)
> 
> I tried to compile unproven-pthreads by making some symbolic links and
> changing the configure script to think sparc64 was the same as sparc,
> but while I have no idea if this could even theoretically work with the
> assembly syscall wrappers and user context switching, it didn't even
> link properly in practice. If someone could provide some clue, I'd like
> to give porting it to sparc64 a shot so I can kick non-preemptive evil
> out of my life for good. :-) (Is it worth the effort? How far off is
> the SMP people's kernel supported threads?)
> 

I can't comment on unproven-pthreads, never tried it. I'd try linuxthreads
as well. It might be possible to get those running may be even more
easy(we have clone(2)). You'll get all kernel threads with corresponding
overhead though.

I'm working on sparc64 support for scheduler-activated threads which is
nathanw-sa branch. The branch is quite stable (i.e. I havn't tried to
stress it but it's been running all the time for me). Pthreads support
is not fully functional at the moment and I have no idea how long would
it take to complete it. Good thing that it seems that all problems I see
now are in user-land part.

> [0] Glorified co-routines (Pth) doesn't count until I see something
>     actually working reasonably well with non-preemptive threads.
> [1] Although gcc likes to SEGV when it sees -O2. Anyone tried 3.0.4
>     on sparc64?

I'd use 3.1 prerelease. It gives significantly better result on gcc's
testsuite, it can compile kernel no problem, I tried it on some packages
(very lightly). If it fails for you, file them PR.

	Andrey