public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* How to find out which pages were copied-on-write?
@ 2004-07-06 15:58 Lutz Vieweg
  2004-07-09 11:31 ` Robin Holt
  0 siblings, 1 reply; 10+ messages in thread
From: Lutz Vieweg @ 2004-07-06 15:58 UTC (permalink / raw)
  To: linux-kernel

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



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-07-14  0:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-06 15:58 How to find out which pages were copied-on-write? Lutz Vieweg
2004-07-09 11:31 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox