From owner-freebsd-threads@FreeBSD.ORG Sat Jul 26 13:52:18 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 17E5B37B401; Sat, 26 Jul 2003 13:52:18 -0700 (PDT) Received: from silver.he.iki.fi (silver.he.iki.fi [193.64.42.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id C1A2B43F75; Sat, 26 Jul 2003 13:52:16 -0700 (PDT) (envelope-from pete@he.iki.fi) Received: from PETEX31 (h81.vuokselantie10.fi [193.64.42.129]) by silver.he.iki.fi (8.12.9/8.11.4) with SMTP id h6QKqEsL042743; Sat, 26 Jul 2003 23:52:15 +0300 (EEST) (envelope-from pete@he.iki.fi) Message-ID: <002701c353b7$cb29a310$812a40c1@PETEX31> From: "Petri Helenius" To: , "David Xu" References: Date: Sat, 26 Jul 2003 23:52:13 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 cc: freebsd-threads@freebsd.org Subject: Re: libkse "wieght" 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 Jul 2003 20:52:18 -0000 >Libkse caches up to 100 threads for you, and throws away any more than >that to free(). There is still a bit of set up to do with a libkse >cached thread (makecontext(), add the thread to the run queue, etc), >but it should be faster than creating a thread from scratch. This sounds great, would probably catch most of the cases I´m thinking about without having to reach outside the cache that often. On a related note, looking at the code it seems to me that getaddrinfo holds a mutex while it´s waiting for get lookup to complete so if there is a stalled DNS lookup all other threads wait on the mutex? Is this observation correct? Pete