Line 56:
Line 56:
The changes tracking made developers implement [[Memory images deduplication]] for shmem segments as well.
The changes tracking made developers implement [[Memory images deduplication]] for shmem segments as well.
−
===
+
== Dumping present pages ==
+
+
When dumping the contents of shared memory CRIU doesn't dump all the data. Instead, it determines which pages contain
+
it and dumps only them. This is done similarly to how regular [[memory dumping and restoring]] works, i.e. by analyzing
+
the owners' pagemap entries for PRESENT or SWAPPED bits. But there's one feature of shmem dumps -- sometimes shmem
+
page can exist in the kernel, but not mapped to any process. In this case criu detects one by calling mincore() on
+
the shmem segment, which reports back the page in-memory status. And the mincore bitmap is AND-ed with the per-process
+
ones.
+
+
== See also ==
+
+
[[Memory dumping and restoring]]
+
[[Memory images deduplication]]
[[Category:Memory]]
[[Category:Memory]]
[[Category:Under the hood]]
[[Category:Under the hood]]