From owner-freebsd-current@FreeBSD.ORG Tue Jan 24 03:04:18 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7BDDC16A41F; Tue, 24 Jan 2006 03:04:18 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id B156F43D4C; Tue, 24 Jan 2006 03:04:17 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id k0O31TWo006558; Mon, 23 Jan 2006 20:01:29 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 23 Jan 2006 20:01:51 -0700 (MST) Message-Id: <20060123.200151.127094205.imp@bsdimp.com> To: deischen@freebsd.org From: "M. Warner Losh" In-Reply-To: References: <43D56E79.60504@elischer.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Mon, 23 Jan 2006 20:01:29 -0700 (MST) Cc: freebsd-current@freebsd.org, rwatson@freebsd.org, julian@elischer.org Subject: Re: kernel thread as real 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: Tue, 24 Jan 2006 03:04:18 -0000 In message: Daniel Eischen writes: : On Mon, 23 Jan 2006, Julian Elischer wrote: : : > Robert Watson wrote: : > : > : > well, the operation woudll continue for the parent only I woudl assume. : > : > > (although davidxu is changing that) : > : > I'm not convinced that that multiple threads should be allowed to : > proceed during a fork : > but I can see that not allowing it is more a "foot shooting avoidance" : > than a requirement. : > it could be allowed that if you do a fork and allow multipel threads to : > runat the same time : > and end up with an inconsistant address space in the child, then you get : > what you deserve. : > :-) : : POSIX specifies that only 1 thread (the forking thread) is present : after a fork. If you want all (or some subset) of the parent's : threads to exist after a fork(), you must call it something : else (use a flag to rfork?) and ensure it is not the default : behavior. The problem that we have today is that single_thread suspends most, but not all, of the threads. There are many scenarios where one could get deadlock if you are sleeping uninterruptably in one thread, but interruptably in another. Warner