Re: pagecoloring: kernel 2.2 mm question: what is happening during fork ?

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Tue Jan 29 2002 - 09:37:13 EST


> When I do a fork, which part of the kernel is allocating the memory for
> the childs, where and when the memory copy takes place ? I know that
> linux is doing copy on write but I don't know which part of the kernel
> is really doing the page allocation when the copy on write understands
> that the process really wants to write now. Then the second question is
> how is the memory copy done ?

The page fault handler. When you write to a copy on write page its actually
marked read-only in the hardware. The kernel copies the page marks both
copies writable and fixes up the fault so that user space doesn't see anything
happen.

Alan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jan 31 2002 - 21:01:02 EST