On Thu, 10 Mar 2011, Mordae wrote: > On Thu, 10 Mar 2011 15:33:31 -0600 (CST), Christoph Lameter <cl@xxxxxxxxx> > wrote: > > First establish an RW mapping of the file. > > Then -- when you want to take the snapshot -- unmap it and do two mmaps > to > > the old and new location. Make both readonly and MAP_PRIVATE. That will > > cause the kernel to create readonly pages that are subject to COW. > > I see, that seems reasonable. But what if I was picky and want to snapshot > that piece of memory continuously? Let's say once in several minutes, then > let some thread to do stuffs to the original using consistent information > from the snapshot. Keep the RW mapping around and tear down and repeat the MAP_PRIVATE mmaps areas as needed? Updates would have to be done to the RW mapping. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxxx 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@xxxxxxxxx"> email@xxxxxxxxx </a>