criu/include
Andrey Vagin d6a1cd0fbc restore: Learn to work with shared struct file-s
Some process can share one struct file-s, we may find them by "object IDs".
A file descriptor is opened in one process and send to other via unix socket.

The procedure of restoring files contains four stages.
* Collect data about all file's descriptors
  On this stage we find process which will restore a file descriptor and
  create a list of processes, who should get this descriptor.

* Create datagrams unix sockets
  If a file descriptor should be received, a unix socket is created
  instead of it.

* Open file descriptors
  A process with the least pid opens a file and sends this file
  descriptors to all one who wait it.

* Receive file descriptors.

When we were thinking up this algoritm, we wanted to minimize a number
of context switches. A number of context switches is proportional of a
number of processes.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-11 16:01:44 +04:00
..
atomic.h Gather futex helpers into lock.h 2011-12-26 23:54:18 +04:00
bitops.h restore: Add mutexes via futex syscall and order threads creation 2011-11-18 16:09:01 +04:00
compiler.h Add ALIGN helper 2011-11-16 18:16:12 +04:00
crtools.h crtools: Sanitize the tasklist states switch 2012-01-11 13:59:15 +04:00
files.h restore: Learn to work with shared struct file-s 2012-01-11 16:01:44 +04:00
image.h restore: Learn to work with shared struct file-s 2012-01-11 16:01:44 +04:00
libnetlink.h net: Define named constant for nlmsg_seq 2011-12-27 20:13:18 +04:00
list.h Initial commit 2011-09-23 12:00:45 +04:00
lock.h lock: Add cr_wait_init helper 2012-01-04 16:40:13 +04:00
log.h Move logging functions to log.c 2011-12-19 18:52:50 +04:00
parasite-syscall.h crtools: Sanitize parasite_ctl pass to parasite_cure_seized 2012-01-11 14:00:06 +04:00
parasite.h parasite: Make max size for path being PATH_MAX 2011-12-19 15:34:37 +04:00
ptrace.h dump: Drop unneeded #includes 2011-12-19 23:18:17 +04:00
restorer.h retore: Fix up shared anonymous memory restore procedure 2012-01-04 18:31:48 +04:00
sockets.h net: A few changes in headres to follow c99 2011-12-27 14:26:13 +04:00
syscall-codes.h syscalls: Add sys_msync helper 2012-01-04 16:40:35 +04:00
syscall.h syscalls: Add sys_msync helper 2012-01-04 16:40:35 +04:00
types.h dump: Drop unneeded #includes 2011-12-19 23:18:17 +04:00
unix_diag.h sockets: Update unix_diag.h 2012-01-10 17:26:50 +04:00
util.h crtools: Sanitize the tasklist states switch 2012-01-11 13:59:15 +04:00