Changes

Jump to: navigation, search

Memory changes tracking

15 bytes added, 00:22, 30 August 2016
How we track memory changes: rewrite a bit
In order to find out which memory pages have changed, we [http://lwn.net/Articles/546966/ patched] the kernel. Tracking the memory changes consists of two steps:
* Tell ask the kernel that we want it to keep track of memory changes by particular task (by writing 4 into <code>/proc/$pid/clear_refs</code> filefor each $pid we are interested in).
and , after a while,
* Get what get the list of modified pages were modified by task of a process by reading its <code>/proc/$pid/pagemap</code> file and looking at so called ''soft-dirty'' bit in the pagemap entries.
On During the first step , kernel will re-map all the tasks' mapping in read-only manner. If a task will try then tries to write into one any of its pages later, a page fault would will occur , and the kernel would will note which page was is being written to. Reading the <code>pagemap</code> file reveals this information.
== How to use this with CRIU ==

Navigation menu