From owner-freebsd-threads@FreeBSD.ORG Fri Apr 25 21:52:22 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 A1E9C37B401; Fri, 25 Apr 2003 21:52:22 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id B881E43FBF; Fri, 25 Apr 2003 21:52:21 -0700 (PDT) (envelope-from eischen@pcnet1.pcnet.com) Received: from pcnet1.pcnet.com (localhost [127.0.0.1]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h3Q4qKBg026384; Sat, 26 Apr 2003 00:52:20 -0400 (EDT) Received: from localhost (eischen@localhost)h3Q4qKgC026380; Sat, 26 Apr 2003 00:52:20 -0400 (EDT) Date: Sat, 26 Apr 2003 00:52:20 -0400 (EDT) From: Daniel Eischen To: David Xu In-Reply-To: <200304250242.h3P2g2F6085399@freefall.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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: Sat, 26 Apr 2003 04:52:23 -0000 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. :-) David, I noticed that we hold the scheduling lock before and after calling the scheduler. Is this necessary? And if so, is it necessary to hold hold it after return from the scheduling switch? One you're in the scheduler, and choose another thread (releasing the lock after doing so), shouldn't you be able to switch to it without having the lock? -- Dan Eischen