From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 22 22:02:16 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 688DF16A4CE for ; Fri, 22 Apr 2005 22:02:16 +0000 (GMT) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1314743D2D for ; Fri, 22 Apr 2005 22:02:16 +0000 (GMT) (envelope-from dleimbac@gmail.com) Received: by zproxy.gmail.com with SMTP id 18so141721nzp for ; Fri, 22 Apr 2005 15:02:15 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ICiSPbR7tU37T5BxehD+mwEU60hOPzLQp2gg1UbvflQ0JSAqzgZzEtZDb0FmKncUTEdwXoNXtZ1aL5lQoynbF4igSs/H4/SW8utVEWLr5zRRSUMJxq8+70Y16sAs01xOj02E1PiuXKgbfZAYTl1U2mgFeW31TvR90fbLouN8SwM= Received: by 10.36.33.6 with SMTP id g6mr195053nzg; Fri, 22 Apr 2005 15:02:15 -0700 (PDT) Received: by 10.36.103.17 with HTTP; Fri, 22 Apr 2005 15:02:15 -0700 (PDT) Message-ID: <5bbfe7d4050422150226c6712d@mail.gmail.com> Date: Fri, 22 Apr 2005 15:02:15 -0700 From: David Leimbach To: Julian Elischer In-Reply-To: <426953C5.9080502@elischer.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <5bbfe7d40504220842578b2d2d@mail.gmail.com> <426953C5.9080502@elischer.org> cc: FreeBSD Hackers Subject: Re: libthread 1:1 threads X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: David Leimbach List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Apr 2005 22:02:16 -0000 On 4/22/05, Julian Elischer wrote: >=20 >=20 > David Leimbach wrote: >=20 > >Perhaps David Xu could clue me in a bit more :) > > > >I just got around to reading the status report for FreeBSD and the 1:1 > >threading caught my eye. > > > >I'm not terribly familiar with FreeBSD's KSE based threading but > >rather than adding a new system call [which may be ok... though I've > >worked on systems where a minimal set of system calls is the desired > >approach.. usually microkernels] would it be possible to add KSEs to a > >task using rfork()? > > > > >=20 > KSE and 1:1 threading are different things. > One creatres kernel threads on demand and the other keeps the kernel > threads all the time the user thread exists. >=20 Ah interesting. > rfork is not the same.. it creates a new process context. that is what > Linux does. > it is also what we did before when running the the linuxthreads package. >=20 According to the man page, and plan 9 where rfork originated you can use it to modify an extant process. In fact you have to set the RFPROC flag to make a new process or all the changes apply to the current one. Either that or the man page is wrong. > KSE and 1:1 use a lot of the same kernel changes and entities. > Which one survives will be judged in time. >=20 > >Maybe I've just been playing around with Plan 9 too much lately :) > > > >Anyway, I like that there will be a 1:1 threading library and if I had > >more free time and wasn't working on other projects I'd be more than > >willing to help test and work on/with this. > > > > >=20 > there has been a 1:1 and an M:N library since 5.2 >=20 Yeah but I took a bit of a FreeBSD hiatus around 5.0/5.1 and am just now poking around again so it's all new to me :). Dave