Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jun 2006 18:53:13 +0200
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        hackers@freebsd.org
Cc:        rdivacky@freebsd.org
Subject:   Someone with knowledge in VM/fork (and Copy on Write) needed
Message-ID:  <20060608185313.35d2745d@Magellan.Leidinger.net>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060608185313.35d2745d>