Changes

50 bytes added ,  11:17, 29 April 2018
s/do/does/g
Line 1: Line 1:  
== Problem ==
 
== Problem ==
Private anonymous mappings are tricky. They are declared to belong to a single process only and contain ''its'' data, but the Linux kernel optimizes the case when task calls fork() and creates a copy of himself. In this case all private anonymous mappings are "shared" between the parent and the child, but when either of them tries to modify the memory, the respective page is duplicated and the changes occur in the modifier's copy only.
+
Private anonymous mappings are tricky. They are declared to belong to a single process only and contain ''its'' data, but the Linux kernel optimizes the case when task calls fork() and creates a copy of itself. In this case all private anonymous mappings are "shared" between the parent and the child, but when either of them tries to modify the memory, the respective page is duplicated and the changes occur in the modifier's copy only.
    
When taking a dump of a process tree, it's totally correct to copy contents of all the anonymous private mappings independently and restore them in the same way -- just mmap and put the memory in there. But with this approach we effectively do the described memory duplication and thus increase memory usage by checkpointed and restore application.
 
When taking a dump of a process tree, it's totally correct to copy contents of all the anonymous private mappings independently and restore them in the same way -- just mmap and put the memory in there. But with this approach we effectively do the described memory duplication and thus increase memory usage by checkpointed and restore application.
   −
To fix this, criu in version 0.3 and above do special tricks.
+
To fix this, criu in version 0.3 and above does special tricks.
    
== How restore works to keep COW intact ==
 
== How restore works to keep COW intact ==
Line 32: Line 32:     
{{Like}}
 
{{Like}}
 +
 +
[[Category:Under the hood]]
 +
[[Category:Memory]]
327

edits