From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 9 01:09:27 2006 Return-Path: X-Original-To: hackers@freebsd.org 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 9828716A418 for ; Fri, 9 Jun 2006 01:09:27 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA0F843D5A for ; Fri, 9 Jun 2006 01:09:22 +0000 (GMT) (envelope-from kip.macy@gmail.com) Received: by nz-out-0102.google.com with SMTP id 13so572053nzn for ; Thu, 08 Jun 2006 18:09:22 -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=GuaHxL5DTn6ANGUhUGnXM8N2BKuatRfTUKKaQLjcN8Q5GFTlNNxcd4XxbpOqKC6243Jk653Z7UCtiJbRDY3iie+EU+e1S6ffT5XGpKMYYnFHgEgPGYeu6YKpgYodxk0EyhgQBsLEjjOJZPb/fnlcwKVel1ilpPcBGc5fXOR9Zx8= Received: by 10.64.210.4 with SMTP id i4mr2587413qbg; Thu, 08 Jun 2006 18:09:22 -0700 (PDT) Received: by 10.65.231.11 with HTTP; Thu, 8 Jun 2006 18:09:22 -0700 (PDT) Message-ID: Date: Thu, 8 Jun 2006 18:09:22 -0700 From: "Kip Macy" To: "Alexander Leidinger" In-Reply-To: <20060608185313.35d2745d@Magellan.Leidinger.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20060608185313.35d2745d@Magellan.Leidinger.net> Cc: rdivacky@freebsd.org, hackers@freebsd.org Subject: Re: Someone with knowledge in VM/fork (and Copy on Write) needed X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: kmacy@fsmware.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jun 2006 01:09:27 -0000 Take a look at vm_forkproc in vm_glue.c -Kip On 6/8/06, Alexander Leidinger wrote: > Hi, > > Roman (and I) need someone who is able to explain fork() and VM stuff. > > The problem is that the linux clone() syscall is supposed to do COW of > the stack in some cases (if the child_stack argument is NULL it has to > COW the thread stack, making a copy immediately is maybe ok too as a > workaround). I don't know enough about the VM, so I ask here. > > We looked at the code of fork1(), but I can't find a description of > what it is supposed to do and how flags are interpreted. Based upon the > first comment in fork1() it may be able to do it itself. But this > comment may also be completely unrelated to the solution we search. > > It would make sense to have a little bit of > documentation in the vicinity of this function. > > So can someone explain how the stack is copied when calling > fork()/fork1() or whatever_function_foo()? > > Bye, > Alexander. > > -- > Selling GoodYear Eagle F1 235/40ZR18, 2x 4mm + 2x 5mm, ~150 EUR > you have to pick it up between Germany/Saarland and Luxembourg/Capellen > http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 > http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >