From owner-freebsd-threads@FreeBSD.ORG Thu Jul 17 19:52:08 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 7AADD37B401 for ; Thu, 17 Jul 2003 19:52:08 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id C859343F75 for ; Thu, 17 Jul 2003 19:52:07 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h6I2q6AI020118; Thu, 17 Jul 2003 22:52:06 -0400 (EDT) Date: Thu, 17 Jul 2003 22:52:06 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Petri Helenius In-Reply-To: <3F0A7425.9080300@he.iki.fi> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-threads@freebsd.org Subject: Re: thread scheduling priority with libkse X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: deischen@freebsd.org List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jul 2003 02:52:08 -0000 On Tue, 8 Jul 2003, Petri Helenius wrote: > Daniel Eischen wrote: > > >The current thread. As I said before, if there are idle KSEs, then > >one is woken to run the newly runnable thread. > > > I'm seeing about 200 microsecond latency when scheduling the thread on > the other > KSE. Which translates to maximum of 2500 "spins" of the contested loop > a second. > > Same code runs about 500000 spins a second when no locking is involved. I just committed a change to libpthread so that preemption points are added when threads are made runnable after a mutex is released or a condition variable is signaled. You might try your test again with this change and see if it helps. -- Dan Eischen