SMPing libpthread

David Xu davidxu at freebsd.org
Thu Apr 24 23:08:00 PDT 2003


----- Original Message ----- 
From: "Daniel Eischen" <eischen at pcnet1.pcnet.com>
To: "David Xu" <davidxu at freebsd.org>
Cc: <freebsd-threads at freebsd.org>
Sent: Friday, April 25, 2003 11:07 AM
Subject: Re: SMPing libpthread


> On Thu, 24 Apr 2003, David Xu wrote:
> 
> > I have put a patch to enable userland support SMP scheduling. 
> > http://people.freebsd.org/~davidxu/libpthread_smp.diff
> > The patch works on my SMP machine, but not fully tested,
> > and I will work on idle kses stuffs. At least, it seems
> > the SMP speed is not slower than UP. :-)
> 
> Cool, I just found the bug with scope process threads that was
> causing Token_Strategy_Test to fail.  Now the 2 ACE tests that
> were SIGBUS'ing (with scope system threads enabled) are now
> running.  Only Token_Strategy_Test fails, but it is just an
> expected result where some mean value is less than the stddev.
> 
>   http://people.freebsd.org/~deischen/kse/libpthread.diffs
> 
> I was willing to work on the idle KSEs; I was just asking
> your opinion :-)  Feel free to tackle it though.
> 

I have a simple idea, in kse_wait(), a kse inserts itself into
an idle kse queue under scheduler lock held(it is already), 
then release scheduler lock and call kse_release(). any
other kses enters in _thr_sched_multi and got a completed context 
list should look the idle kses queue and wakeup those idle kses
accordingly, also _thr_set_runnable_unlocked etc should look
the idle queue as well, because all things are done under scheduler
lock, it seems very nice for me. :-)


> This is fun stuff :-)
> 
True!

> -- 
> Dan Eischen
> 
> _______________________________________________
> freebsd-threads at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-threads
> To unsubscribe, send any mail to "freebsd-threads-unsubscribe at freebsd.org"



More information about the freebsd-threads mailing list