All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lutz Vieweg <lkv@isg.de>
To: linux-kernel@vger.kernel.org
Subject: How to find out which pages were copied-on-write?
Date: Tue, 06 Jul 2004 17:58:04 +0200	[thread overview]
Message-ID: <40EACC0C.6060606@isg.de> (raw)

Hi,

in an application that MAP_PRIVATEly mmap()s a file it would
be quite helpful for me to find out which pages have been
copied-on-write.

I found that mincore() does a similar thing by reporting which
pages are currently residing in physical memory, but what
I want to know is which pages differ from the original file
image on disk.

Can you recommend a way to do that? (does not need to be
portable beyond Linux)

Alternatively, it would be sufficient if I could turn
a private mapping into a shared one (and possibly do an
msync() afterwards if I need to make sure the changes
have been written out). Would such a feature need a
lot of effort to implement?


Yet another feature that I could use if it were available:
A "copy-on-read"-mapping. There, a page would become a private
copy of a process once _another_ process wrote data to the
corresponding file location. But I suspect that feature
could be very hard to implement...

Regards,

Lutz Vieweg



             reply	other threads:[~2004-07-06 16:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-06 15:58 Lutz Vieweg [this message]
2004-07-09 11:31 ` How to find out which pages were copied-on-write? Robin Holt
2004-07-09 20:42   ` Lutz Vieweg
2004-07-10  8:11     ` Michael Clark
2004-07-12 17:21       ` Lutz Vieweg
2004-07-13  4:16         ` Michael Clark
2004-07-13 13:04           ` Lutz Vieweg
2004-07-13 15:02             ` Michael Clark
2004-07-13 15:39               ` Lutz Vieweg
2004-07-14  0:25                 ` Michael Clark

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=40EACC0C.6060606@isg.de \
    --to=lkv@isg.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.