linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mordae <mordae@anilinux.org>
To: Christoph Lameter <cl@linux.com>
Cc: linux-mm@kvack.org
Subject: Re: COW userspace memory mapping question
Date: Thu, 10 Mar 2011 22:00:40 +0100	[thread overview]
Message-ID: <faf1c53253ae791c39448de707b96c15@anilinux.org> (raw)
In-Reply-To: <alpine.DEB.2.00.1103101309090.2161@router.home>

On Thu, 10 Mar 2011 13:13:02 -0600 (CST), Christoph Lameter <cl@linux.com>
wrote:
> Its probably more an issue of us understanding what you want.

Okay. I've posted the message from within the CET. It was
approximately 1 am and I am not a native speaker. So, once again
sorry and thanks a lot for your help. :-)

Now to the question.

> Ok let say you have a memory range in the address space from which you
> want to take a snapshot. How is that snapshot data visible? To another
> process? Via a file?

As I understand that, before a process forks, all of it's private memory
pages are somehow magically marked. When a process with access to such
page attempts to modify it, the page is duplicated and the copy replaces
the shared page for this process. Then the actual modification is
carried on.

What I am interested in is a hypothetical system call

  void *mcopy(void *dst, void *src, size_t len, int flags);

which would make src pages marked in the same way and mapped *also* to
the dst. Afterwards, any modification to either mapping would not
influence the other.

Now, is there something like that?

Best regards,
    Jan Dvorak

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2011-03-10 21:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-08 21:38 COW userspace memory mapping question Mordae
2011-03-10 19:13 ` Christoph Lameter
2011-03-10 21:00   ` Mordae [this message]
2011-03-10 21:33     ` Christoph Lameter
2011-03-10 22:11       ` Mordae
2011-03-11 15:15         ` Christoph Lameter
2011-03-11 16:33           ` Jan Dvorak

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=faf1c53253ae791c39448de707b96c15@anilinux.org \
    --to=mordae@anilinux.org \
    --cc=cl@linux.com \
    --cc=linux-mm@kvack.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;
as well as URLs for NNTP newsgroup(s).