From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 8 21:30:33 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 BE51116D6E3; Thu, 8 Jun 2006 16:52:56 +0000 (UTC) (envelope-from Alexander@Leidinger.net) Received: from www.ebusiness-leidinger.de (jojo.ms-net.de [84.16.236.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id E729E43D45; Thu, 8 Jun 2006 16:52:55 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from Andro-Beta.Leidinger.net (p54A5DC25.dip.t-dialin.net [84.165.220.37]) (authenticated bits=0) by www.ebusiness-leidinger.de (8.13.4/8.13.4) with ESMTP id k58GoJHn039444; Thu, 8 Jun 2006 18:50:20 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from Magellan.Leidinger.net (Magellan.Leidinger.net [192.168.1.1]) by Andro-Beta.Leidinger.net (8.13.4/8.13.3) with ESMTP id k58GqrJW055132; Thu, 8 Jun 2006 18:52:54 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Date: Thu, 8 Jun 2006 18:53:13 +0200 From: Alexander Leidinger To: hackers@freebsd.org Message-ID: <20060608185313.35d2745d@Magellan.Leidinger.net> X-Mailer: Sylpheed-Claws 2.2.2 (GTK+ 2.8.18; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new X-Mailman-Approved-At: Thu, 08 Jun 2006 22:33:43 +0000 Cc: rdivacky@freebsd.org Subject: 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 List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jun 2006 21:30:33 -0000 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