From owner-freebsd-threads@FreeBSD.ORG Tue Nov 2 18:16:33 2010 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EC63106566B; Tue, 2 Nov 2010 18:16:33 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from out-0.mx.aerioconnect.net (out-0-26.mx.aerioconnect.net [216.240.47.86]) by mx1.freebsd.org (Postfix) with ESMTP id 6191C8FC17; Tue, 2 Nov 2010 18:16:33 +0000 (UTC) Received: from idiom.com (postfix@mx0.idiom.com [216.240.32.160]) by out-0.mx.aerioconnect.net (8.13.8/8.13.8) with ESMTP id oA2HtVa9008185; Tue, 2 Nov 2010 10:55:31 -0700 X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (h-67-100-89-137.snfccasy.static.covad.net [67.100.89.137]) by idiom.com (Postfix) with ESMTP id 50B552D6019; Tue, 2 Nov 2010 10:55:30 -0700 (PDT) Message-ID: <4CD05090.4070404@freebsd.org> Date: Tue, 02 Nov 2010 10:55:28 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: David Xu References: <4CD03E75.1050302@freebsd.org> In-Reply-To: <4CD03E75.1050302@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on 216.240.47.51 Cc: freebsd-threads@freebsd.org Subject: Re: Thread ID is reused too quickly X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Nov 2010 18:16:33 -0000 On 11/2/10 9:38 AM, David Xu wrote: > Our kernel thread ID is reused too quickly, is there any way to fix > it ? we could free them into a holding pool, (an array set up as a ring buffer) with (say) several hundred slots.. until the pool fills up we don't actually give any thread-IDs back and when it fills up we put the ID we are removing into the head of the queue and give back the one that is at the other end of the queue. I think it would be very easy to implement.. you might even have a per-cpu version if you didn't want a lock or maybe there is a lock already in use we can hide it under. Julian > > Regards, > David Xu > _______________________________________________ > 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" >