From owner-freebsd-threads@FreeBSD.ORG Tue Apr 22 16:46:30 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 C269137B401 for ; Tue, 22 Apr 2003 16:46:30 -0700 (PDT) Received: from sccrmhc01.attbi.com (sccrmhc01.attbi.com [204.127.202.61]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6470C43F93 for ; Tue, 22 Apr 2003 16:46:20 -0700 (PDT) (envelope-from julian@elischer.org) Received: from interjet.elischer.org (12-232-168-4.client.attbi.com[12.232.168.4]) by sccrmhc01.attbi.com (sccrmhc01) with ESMTP id <2003042223461900100e654ie>; Tue, 22 Apr 2003 23:46:19 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id QAA88081; Tue, 22 Apr 2003 16:46:17 -0700 (PDT) Date: Tue, 22 Apr 2003 16:46:15 -0700 (PDT) From: Julian Elischer To: Daniel Eischen In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: threads@freebsd.org Subject: Re: libkse -> libpthread X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2003 23:46:31 -0000 On Tue, 22 Apr 2003, Daniel Eischen wrote: > 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 ? UTS is protected.. this way.. but other threads can disable upcalls by setting a flag in the mailbox > > 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 > > _______________________________________________ > 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" >