criu/include
Pavel Emelyanov cf01381cbd mem: Drain memory from parasite before dumping it into file
Currently we dump pages directly from parasite into image files. This
is bad for several reasons:

1. We cannot use any more-or-less custom format for pages easily, since
   parasite code cannot be linked with any libraries;
2. We will not be able to optimize migration with preliminary memory
   migration (a.k.a. iterative migration) with it -- if we send pages
   from parasite over network we are not able to let the task we dump
   continue running.

That said, what is done is -- pages from target task are put into a
page-pipe in one go, then (not in this patch) parasite can be released
and we can do with pages whatever we want. For now pages are just
spliced from pipe into image file.

Some numbers:
In order to drain 1Gb of memory from task we need 1.5M of shared map
in args (for iovecs) and 4 pipes (8 descriptors) each referencing 128Mb
of pages, which int turn requires 4 x 640K chunks of sequential kernel
memory (for pipe_buffer). Not that big I guess.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-03-01 20:13:11 +04:00
..
bug.h Move BUG_ONs to include/bug.h 2013-02-27 15:43:31 +04:00
compiler.h include/compiler.h: Cleanup 2013-02-15 17:34:38 +04:00
cpu.h cpu: Make cpu routines being per-acrh 2013-02-18 18:42:08 +04:00
crtools.h vma: Keep track of lonest vma in list and sum of its lengths 2013-03-01 20:12:33 +04:00
eventfd.h files: pass a file descriptor on an fdinfo image instead of cr_fdset 2013-01-11 14:47:09 +04:00
eventpoll.h files: pass a file descriptor on an fdinfo image instead of cr_fdset 2013-01-11 14:47:09 +04:00
fifo.h files: pass a file descriptor on an fdinfo image instead of cr_fdset 2013-01-11 14:47:09 +04:00
file-ids.h headers: Change "../protobuf/" to "protobuf/" 2013-02-15 17:33:06 +04:00
file-lock.h headers: Change "../protobuf/" to "protobuf/" 2013-02-15 17:33:06 +04:00
files-reg.h headers: Change "../protobuf/" to "protobuf/" 2013-02-15 17:33:06 +04:00
files.h headers: Change "../protobuf/" to "protobuf/" 2013-02-15 17:33:06 +04:00
fsnotify.h fsnotify: Add dumping of fanotify objects 2013-01-15 18:34:50 +04:00
image.h crtools: add image contents for filelocks 2013-01-17 14:40:00 +04:00
inet_diag.h headers: Unify include guards (in comments) and a few fixes 2012-12-25 22:40:24 +04:00
ipc_ns.h ns: Introduce ns descriptors 2013-01-15 23:24:01 +04:00
kcmp-ids.h headers: Unify include guards (in comments) and a few fixes 2012-12-25 22:40:24 +04:00
libnetlink.h headers: Unify include guards (in comments) and a few fixes 2012-12-25 22:40:24 +04:00
list.h headers: Unify include guards (in comments) and a few fixes 2012-12-25 22:40:24 +04:00
lock.h lock: Include bug.h instead of big util.h 2013-02-27 15:43:33 +04:00
log-levels.h headers: Unify include guards (in comments) and a few fixes 2012-12-25 22:40:24 +04:00
log.h log: Make pr_err_once to use pr_err 2013-01-14 14:26:07 +04:00
mount.h ns: Introduce ns descriptors 2013-01-15 23:24:01 +04:00
namespaces.h rst: Evaluate per-task clone mask early 2013-01-19 01:16:19 +04:00
net.h ns: Introduce ns descriptors 2013-01-15 23:24:01 +04:00
netfilter.h headers: Unify include guards (in comments) and a few fixes 2012-12-25 22:40:24 +04:00
packet_diag.h headers: Unify include guards (in comments) and a few fixes 2012-12-25 22:40:24 +04:00
page-pipe.h page-pipe: Introduce object to collect pages within 2013-03-01 20:12:58 +04:00
parasite-syscall.h vma: Introduce list-of-vmas object 2013-03-01 20:11:51 +04:00
parasite.h mem: Drain memory from parasite before dumping it into file 2013-03-01 20:13:11 +04:00
pipes.h headers: Change "../protobuf/" to "protobuf/" 2013-02-15 17:33:06 +04:00
proc_parse.h vma: Introduce list-of-vmas object 2013-03-01 20:11:51 +04:00
protobuf.h protobuf: cast the result of the macro pb_repeated_size to size_t 2013-01-18 11:41:43 +04:00
pstree.h pstree: Add general core_entry_free helper 2013-02-22 15:41:27 +04:00
ptrace.h headers: Unify include guards (in comments) and a few fixes 2012-12-25 22:40:24 +04:00
rbtree.h x86: moved x86-specific files into the directory arch/x86. 2013-01-09 17:02:47 +04:00
restorer.h fpu: Move definitions to asm/fpu.h 2013-02-18 18:42:08 +04:00
shmem.h headers: Change "../protobuf/" to "protobuf/" 2013-02-15 17:33:06 +04:00
sigframe.h include/restorer.h: moved machine-independent sigframe structs to the file include/sigframe.h. 2013-01-09 17:33:59 +04:00
signalfd.h files: pass a file descriptor on an fdinfo image instead of cr_fdset 2013-01-11 14:47:09 +04:00
sk-inet.h headers: Change "../protobuf/" to "protobuf/" 2013-02-15 17:33:06 +04:00
sk-packet.h files: pass a file descriptor on an fdinfo image instead of cr_fdset 2013-01-11 14:47:09 +04:00
sk-queue.h x86: moved x86-specific files into the directory arch/x86. 2013-01-09 17:02:47 +04:00
sockets.h headers: Change "../protobuf/" to "protobuf/" 2013-02-15 17:33:06 +04:00
syscall-types.h rst: Evaluate per-task clone mask early 2013-01-19 01:16:19 +04:00
sysctl.h headers: Unify include guards (in comments) and a few fixes 2012-12-25 22:40:24 +04:00
tty.h tty: require stdin to be a terminal only if shell_job is set 2013-01-22 22:45:31 +04:00
unix_diag.h x86: moved x86-specific files into the directory arch/x86. 2013-01-09 17:02:47 +04:00
util-net.h headers: Unify include guards (in comments) and a few fixes 2012-12-25 22:40:24 +04:00
util.h Move BUG_ONs to include/bug.h 2013-02-27 15:43:31 +04:00
uts_ns.h ns: Introduce ns descriptors 2013-01-15 23:24:01 +04:00