Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Jan 2004 10:10:34 +0800
From:      David Xu <davidxu@freebsd.org>
To:        Daniel Eischen <eischen@vigrid.com>
Cc:        freebsd-threads@freebsd.org
Subject:   Re: "maxthr" state
Message-ID:  <40171A1A.1070003@freebsd.org>
In-Reply-To: <Pine.GSO.4.10.10401270918140.22889-100000@pcnet5.pcnet.com>
References:  <Pine.GSO.4.10.10401270918140.22889-100000@pcnet5.pcnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Daniel Eischen wrote:
> On Tue, 27 Jan 2004, Julian Elischer wrote:
>>
>>We are limitted by hardware to 8191 kernel threads on x86
>>but that could be a LOT of user threads..
> 
> 
> Using libkse, you are limited to 8191 KSEs, not threads.
> You can have as many threads for which you have the (other)
> resources :)
> 
> 
System scope threads can only have 8191 threads or less, this because
current implementing in libkse and libthr use LDT entry for TLS, if we
defined a fixed entry in GDT, and introduce a syscall allow userland
to set TLS, and remember it in kernel, in kernel context switch routine,
we can load the TLS into the fixed GDT entry, and userland only has one
GDT entry for all system scope threads, for example, we use %gs as TLS
register, and all thread will have same %gs, in this way, we no longer
have 8191 threads limit.

David Xu




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40171A1A.1070003>