From owner-freebsd-threads@FreeBSD.ORG Fri Aug 1 00:18:16 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 73CBA37B401 for ; Fri, 1 Aug 2003 00:18:16 -0700 (PDT) Received: from ns.aratech.co.kr (ns.aratech.co.kr [61.34.11.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id 50A9143F75 for ; Fri, 1 Aug 2003 00:18:15 -0700 (PDT) (envelope-from tj@atj.dyndns.org) Received: from tj.aratech.co.kr ([61.34.11.212] helo=atj.dyndns.org ident=mail) by ns.aratech.co.kr with esmtp (Exim 3.36 #1 (Debian)) id 19iUAz-00008X-00 for ; Fri, 01 Aug 2003 16:18:09 +0900 Received: from tj by atj.dyndns.org with local (Exim 4.20) id 19iUBP-0000hC-TJ for freebsd-threads@freebsd.org; Fri, 01 Aug 2003 16:18:35 +0900 Date: Fri, 1 Aug 2003 16:18:35 +0900 To: freebsd-threads@freebsd.org Message-ID: <20030801071835.GA2653@atj.dyndns.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i From: TeJun Huh Subject: Re: And problems regarding -lthr (1:1 KSE) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: tejun@aratech.co.kr List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Aug 2003 07:18:16 -0000 On Fri, Aug 01, 2003 at 02:56:42AM -0400, Daniel Eischen wrote: > > You can create thousands with libkse. You'll really > only be limited by memory -- unless you create a lot > of threads as PTHREAD_SCOPE_SYSTEM, in which case you'll > likely have similar limitations as libthr. As julian > said, libkse can be compiled to be in 1:1 mode, so if > you build it that way (the default is M:N, not 1:1), > you'll also be limited. > > Dan Eischen Yes, I tried that. Currently, what I wanna know are 1. How to increase the number of threads upto ~9000 using 1:1 threading. It doesn't matter whether I use libkse or libthr. I'm gonna try recompile libthr with MAXTHR, UMTX_QUEUES adjusted. If that works, this problem is solved. (Although still limited to ~9000) 2. On M:N KSE, how to put more KSEs into one process or KSE group. >From what I understand, a KSE multiplexes userthreads, but when the user thread invokes a blocking systemcall, the KSE blocks handling it and another KSE does an upcall to user level scheduler notifying the blocking and the user level scheduler can utilize the upcalling KSE to run another user thread, thus maintaining concurrency. (Am I getting it right?) So, with large number of threads blocked, large number of KSEs are needed and, from what I've read, the hard limit will be ~9000 because KSEs shouldn't be very different from kernel threads from this perspective. But what I get is something around 150 and wanna know if there is any sysctl or boot kernel parameter or anything that can be tuned to increase this limit. 3. Lastly, about the kernel hang problem. Is it a known bug or fixed in 5.1-CURRENT? If not, I think this is a very serious problem, because any user can hang the whole system very hard. Thanks in advance.