From owner-freebsd-current@FreeBSD.ORG Sun Jan 22 06:18:25 2006 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from [127.0.0.1] (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 1083416A420; Sun, 22 Jan 2006 06:18:23 +0000 (GMT) (envelope-from davidxu@freebsd.org) Message-ID: <43D323C3.7050004@freebsd.org> Date: Sun, 22 Jan 2006 14:18:43 +0800 From: David Xu User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.7.12) Gecko/20060117 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Julian Elischer References: <43D1F384.7080406@elischer.org> In-Reply-To: <43D1F384.7080406@elischer.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: current@freebsd.org Subject: Re: kernel threads as threads. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jan 2006 06:18:25 -0000 Julian Elischer wrote: > > I have made a first set of changes to allow threads to be 'forked' > within the kernel. > > I have run on the resulting kernel for some of today with no problems > other than > some statistics oddness in top which I plan on looking at next week. > > The current patch doen't remove the ability to make kernel processes, > however it does > add the ability to make threads under process 0 and alters nearly all > the users of > kernel threads to actually do this.. The exception is the aio threads, > as they seem to require > separate address spaces to work with and that requires separate proc > structures. > > I was thinking that they could act as extra threads on the calling > processes but that > is more of a rewrite than I plan right now. > > Anyhow the diffs so far are at: > > http://www.freebsd.org/~julian/kthread.diff. > > more later. > > julian in vfs_aio.c, we have to borrow user process's vmspace, creating all kthread in proc0 breaks this. David Xu