Line 66:
Line 66:
== Dumping present pages ==
== Dumping present pages ==
−
When dumping the contents of shared memory CRIU doesn't dump all the data. Instead, it determines which pages contain
+
When dumping the contents of shared memory, CRIU does not dump all of 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
+
it, and only dumps those pages. This is done similarly to how regular [[memory dumping and restoring]] works, i.e. by looking
−
the owners' pagemap entries for PRESENT or SWAPPED bits. But there's one feature of shmem dumps -- sometimes shmem
+
for PRESENT or SWAPPED bits in owners' pagemap entries.
−
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
+
There is one particular feature of shared memory dumps worth mentioning. Sometimes, a shared memory page
−
ones.
+
can exist in the kernel, but it is not mapped to any process. CRIU detects such pages by calling mincore()
+
on the shmem segment, which reports back the page in-memory status. The mincore bitmap is when ANDed with
+
the per-process ones.
== See also ==
== See also ==