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



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).

Attachment: pgpZWBipvaMe1.pgp
Description: PGP signature



Relevant Pages

  • Someone with knowledge in VM/fork (and Copy on Write) needed
    ... The problem is that the linux clonesyscall is supposed to do COW of ... the stack in some cases (if the child_stack argument is NULL it has to ... first comment in fork1() it may be able to do it itself. ...
    (freebsd-hackers)
  • Re: Someone with knowledge in VM/fork (and Copy on Write) needed
    ... Roman need someone who is able to explain fork() and VM stuff. ... The problem is that the linux clonesyscall is supposed to do COW of ... the stack in some cases (if the child_stack argument is NULL it has to ... first comment in fork1() it may be able to do it itself. ...
    (freebsd-hackers)
  • Re: Shared pagetables
    ... >> Obviously CoW page tables will be more complicated. ... > to the stack page and force CoW to give parent and child ... only the second level. ... have large mmaped files or shared memory, ...
    (comp.os.linux.development.system)
  • Re: is there any powerful program that can.......
    ... >> Is there a clever machine, that can give me the cow when all I have ... >> is a stack of hamburgers? ...
    (alt.comp.lang.learn.c-cpp)