And problems regarding -lthr (1:1 KSE)

David Xu davidxu at FreeBSD.org
Fri Aug 1 00:55:01 PDT 2003


On Friday 01 August 2003 15:18, TeJun Huh wrote:
>  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.
>
The following sysctls may help you:
max contextes can be blocked in kernel(not limited by LDT):

kern.threads.max_threads_per_proc

max system scope thread can be created(limited by LDT):
kern.threads.max_groups_per_proc


>  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.
>

After 5.1 release, there are much improvements had been commited.

>  Thanks in advance.
> _______________________________________________
> freebsd-threads at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-threads
> To unsubscribe, send any mail to "freebsd-threads-unsubscribe at freebsd.org"

David Xu



More information about the freebsd-threads mailing list