Skip to content

Commit da4a5a9

Browse files
committed
Add AutoDedup option to CriuOpts
Memory image deduplication, very useful for incremental dumps. See: https://criu.org/Memory_images_deduplication Signed-off-by: Nikolas Sepos <[email protected]>
1 parent 59bbdc4 commit da4a5a9

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

libcontainer/container_linux.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,7 @@ func (c *linuxContainer) Checkpoint(criuOpts *CriuOpts) error {
811811
FileLocks: proto.Bool(criuOpts.FileLocks),
812812
EmptyNs: proto.Uint32(criuOpts.EmptyNs),
813813
OrphanPtsMaster: proto.Bool(true),
814+
AutoDedup: proto.Bool(criuOpts.AutoDedup),
814815
}
815816

816817
fcg := c.cgroupManager.GetPaths()["freezer"]
@@ -1012,6 +1013,7 @@ func (c *linuxContainer) Restore(process *Process, criuOpts *CriuOpts) error {
10121013
FileLocks: proto.Bool(criuOpts.FileLocks),
10131014
EmptyNs: proto.Uint32(criuOpts.EmptyNs),
10141015
OrphanPtsMaster: proto.Bool(true),
1016+
AutoDedup: proto.Bool(criuOpts.AutoDedup),
10151017
},
10161018
}
10171019

libcontainer/criu_opts_linux.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,5 @@ type CriuOpts struct {
3434
VethPairs []VethPairName // pass the veth to criu when restore
3535
ManageCgroupsMode cgMode // dump or restore cgroup mode
3636
EmptyNs uint32 // don't c/r properties for namespace from this mask
37+
AutoDedup bool // auto deduplication for incremental dumps
3738
}

0 commit comments

Comments
 (0)