linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christopher Lameter <cl@linux.com>
To: Eric Wheeler <linux-mm@lists.ewheeler.net>
Cc: linux-mm@kvack.org
Subject: Re: Copy-on-write with vmalloc
Date: Mon, 14 May 2018 15:34:18 +0000	[thread overview]
Message-ID: <010001635f49bc45-0b91dd16-c92d-4bcd-985f-1cc57ca9e438-000000@email.amazonses.com> (raw)
In-Reply-To: <alpine.LRH.2.11.1805072224360.31774@mail.ewheeler.net>

On Mon, 7 May 2018, Eric Wheeler wrote:

> I would like to clone a virtual address space so that the address spaces
> share physical pages until a write happens, at which point it would copy
> to a new physical page.  I've looked around and haven't found any
> documentation. Certainly fork() already does this, but is there already
> simple way to do it with a virtual address space?

The clone() syscall does it (since it is the underlying basis for fork).

The same effect can also be had by using mmap with
MAP_PRIVATE on a shared memory segment.

      reply	other threads:[~2018-05-14 15:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-07 22:25 Eric Wheeler
2018-05-14 15:34 ` Christopher Lameter [this message]

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=010001635f49bc45-0b91dd16-c92d-4bcd-985f-1cc57ca9e438-000000@email.amazonses.com \
    --to=cl@linux.com \
    --cc=linux-mm@kvack.org \
    --cc=linux-mm@lists.ewheeler.net \
    /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