Someone with knowledge in VM/fork (and Copy on Write) needed

Konstantin Belousov kostikbel at gmail.com
Fri Jun 9 02:55:31 UTC 2006


On Thu, Jun 08, 2006 at 06:53:13PM +0200, 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.
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 :).
> 
> 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).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20060609/b21d4342/attachment.pgp


More information about the freebsd-hackers mailing list