From owner-freebsd-threads@FreeBSD.ORG Thu Apr 24 23:08:00 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6A41B37B401 for ; Thu, 24 Apr 2003 23:08:00 -0700 (PDT) Received: from exchhz01.viatech.com.cn (ip-167-164-97-218.anlai.com [218.97.164.167]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5673A43F75 for ; Thu, 24 Apr 2003 23:07:58 -0700 (PDT) (envelope-from davidxu@freebsd.org) Received: from DAVIDW2K ([192.168.1.240]) by exchhz01.viatech.com.cn with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id JM648883; Fri, 25 Apr 2003 11:10:55 +0800 Message-ID: <027e01c30ada$87d57f10$f001a8c0@davidw2k> From: "David Xu" To: "Daniel Eischen" References: Date: Fri, 25 Apr 2003 11:25:56 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 cc: freebsd-threads@freebsd.org Subject: Re: SMPing libpthread X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2003 06:08:00 -0000 ----- Original Message -----=20 From: "Daniel Eischen" To: "David Xu" Cc: Sent: Friday, April 25, 2003 11:07 AM Subject: Re: SMPing libpthread > On Thu, 24 Apr 2003, David Xu wrote: >=20 > > I have put a patch to enable userland support SMP scheduling.=20 > > 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. :-) >=20 > 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. >=20 > http://people.freebsd.org/~deischen/kse/libpthread.diffs >=20 > I was willing to work on the idle KSEs; I was just asking > your opinion :-) Feel free to tackle it though. >=20 I have a simple idea, in kse_wait(), a kse inserts itself into an idle kse queue under scheduler lock held(it is already),=20 then release scheduler lock and call kse_release(). any other kses enters in _thr_sched_multi and got a completed context=20 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 :-) >=20 True! > --=20 > Dan Eischen >=20 > _______________________________________________ > freebsd-threads@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-threads > To unsubscribe, send any mail to = "freebsd-threads-unsubscribe@freebsd.org"