Date: Tue, 22 Apr 2003 08:55:51 -0400 (EDT) From: Daniel Eischen <eischen@pcnet1.pcnet.com> To: Igor Sysoev <is@rambler-co.ru> Cc: threads@freebsd.org Subject: Re: libkse -> libpthread Message-ID: <Pine.GSO.4.10.10304220851310.27097-100000@pcnet1.pcnet.com> In-Reply-To: <Pine.BSF.4.21.0304221208160.94232-100000@is>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 22 Apr 2003, Igor Sysoev wrote: > On Mon, 21 Apr 2003, Daniel Eischen wrote: > > Libpthread can be made to behave the same as libthr just > > by forcing every thread to be scope system. Currently, > > the implementation for scope system threads does have > > a small amount of overhead in that they still get upcalls > > after the thread blocks in the kernel (in this case > > the KSE just reenters the kernel with kse_release() > > and waits for the thread to become unblocked). These > > KSEs also require a small stack separate from the > > thread's stack. The code is in place (in the UTS) to > > not require a separate stack and not get any upcalls > > for these threads, but we just need a bit more > > kernel work to optimize this overhead away. > > But why is not it implemented via setting kse_mailbox.km_curthread to NULL ? > As I understand it's way to disable upcalls when UTS is preempted > by the kernel (the time slice ended, the page in operation, etc.) > i.e. UTS should always run as 1:1 thread. > Had it been changed ? How is UTS protected now ? We can't use this method yet for 1:1 because we don't have a way to redirect a signal to a thread running like this. We need kse_thr_interrupt() to have a signal argument and for the kernel to install the signal frame on the stack of the target thread (or keep it pending on the thread if masked). -- Dan Eischen
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10304220851310.27097-100000>