public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Momchil Velikov <velco@fadata.bg>
To: "Cabaniols, Sebastien" <Sebastien.Cabaniols@Compaq.com>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: pagecoloring: kernel 2.2 mm question: what is happening during fork ?
Date: 29 Jan 2002 16:43:19 +0200	[thread overview]
Message-ID: <87ofjdi5fc.fsf@fadata.bg> (raw)
In-Reply-To: <11EB52F86530894F98FFB1E21F9972540C239A@aeoexc01.emea.cpqcorp.net>
In-Reply-To: <11EB52F86530894F98FFB1E21F9972540C239A@aeoexc01.emea.cpqcorp.net>

>>>>> "Cabaniols" == Cabaniols, Sebastien <Sebastien.Cabaniols@Compaq.com> writes:

Cabaniols> When I do a fork, which part of the kernel is allocating the memory for
Cabaniols> the childs, where and when the memory copy takes place ?

mm/memory.c:copy_page_range()

It copies page tables and marks the ptes copy-on-write.

Cabaniols> I know that
Cabaniols> linux is doing copy on write but I don't know which part of the kernel
Cabaniols> is really doing the page allocation when the copy on write understands
Cabaniols> that the process really wants to write now. Then the second question is
Cabaniols> how is the memory copy done ?

mm/memory.c: handle_mm_fault()/handle_pte_fault() and do_wp_page()

Cabaniols> The third and last question is what is the role of the slab allocator ?
Cabaniols> When does a process asks for memory from a slab ? Is it used to build
Cabaniols> the stack the heap ? 

Slab allocator is a memory allocation and caching mechanism for
(small) kernel objects. It is described in, e.g., 

    http://nondot.org/sabre/os/files/MemManagement/SlabAllocator.pdf

Regards,
-velco

PS. You may also find help on irc.openprojects.net, #kernelnewbies


  parent reply	other threads:[~2002-01-29 14:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-29 13:36 pagecoloring: kernel 2.2 mm question: what is happening during fork ? Cabaniols, Sebastien
2002-01-29 14:37 ` Alan Cox
2002-01-29 14:43 ` Momchil Velikov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-01-29 15:27 Cabaniols, Sebastien
2002-01-29 15:48 ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ofjdi5fc.fsf@fadata.bg \
    --to=velco@fadata.bg \
    --cc=Sebastien.Cabaniols@Compaq.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox