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

Kip Macy kip.macy at gmail.com
Fri Jun 9 01:09:27 UTC 2006


Take a look at vm_forkproc in vm_glue.c
 -Kip

On 6/8/06, Alexander Leidinger <Alexander at leidinger.net> 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.
>
> <bikeshed color="doxygen">It would make sense to have a little bit of
> documentation in the vicinity of this function.</bikeshed>
>
> 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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
>


More information about the freebsd-hackers mailing list