Date: Fri, 9 Jun 2006 05:55:22 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Alexander Leidinger <Alexander@Leidinger.net> Cc: rdivacky@freebsd.org, hackers@freebsd.org Subject: Re: Someone with knowledge in VM/fork (and Copy on Write) needed Message-ID: <20060609025522.GG54415@deviant.kiev.zoral.com.ua> In-Reply-To: <20060608185313.35d2745d@Magellan.Leidinger.net> References: <20060608185313.35d2745d@Magellan.Leidinger.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--UKNXkkdQCYZ6W5l3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 08, 2006 at 06:53:13PM +0200, Alexander Leidinger wrote: > Hi, >=20 > Roman (and I) need someone who is able to explain fork() and VM stuff. >=20 > 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. This is very strange behaviuor. You mean that other vm_map_entry would be shared, but stack itself becomes divorsed ? I vaguely remember some thread on linux-kernel (that got wide press coverage :)) where Linus very strong disagreed to proposal of implementing IRIX-like procs. As far as I remember, the question was exactly making the private stacks while having other vm space shared. Anyway, this looks interesting, I would like to participate :). >=20 > 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. Flags to fork1() are documented at man rfork(2). --UKNXkkdQCYZ6W5l3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFEiOMZC3+MBN1Mb4gRAp6kAJ9YLQtFcZ6eREZifr0pxcvuJOiauwCgxDYl JKSNtO5ojetSNW+DjvlpaJQ= =NvHN -----END PGP SIGNATURE----- --UKNXkkdQCYZ6W5l3--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060609025522.GG54415>