criu/include
Cyrill Gorcunov e61605169f ctrools: Rewrite task/threads stopping engine is back
This commit brings the former "Rewrite task/threads stopping engine"
commit back. Handling it separately is too complex so better try
to handle it in-place.

Note some tests might fault, it's expected.
---

Stopping tasks with STOP and proceeding with SEIZE is actually excessive --
the SEIZE if enough. Moreover, just killing a task with STOP is also racy,
since task should be given some time to come to sleep before its proc
can be parsed.

Rewrite all this code to SEIZE task and all its threads from the very beginning.

With this we can distinguish stopped task state and migrate it properly (not
supported now, need to implement).

This thing however has one BIG problem -- after we SEIZE-d a task we should
seize
it's threads, but we should do it in a loop -- reading /proc/pid/task and
seizing
them again and again, until the contents of this dir stops changing (not done
now).

Besides, after we seized a task and all its threads we cannot scan it's children
list once -- task can get reparented to init and any task's child can call clone
with CLONE_PARENT flag thus repopulating the children list of the already seized
task (not done also)

This patch is ugly, yes, but splitting it doesn't help to review it much, sorry
:(

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-02-01 19:49:28 +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 ctrools: Rewrite task/threads stopping engine is back 2012-02-01 19:49:28 +04:00
files.h restore: Learn to work with shared struct file-s 2012-01-11 16:01:44 +04:00
image.h ctrools: Rewrite task/threads stopping engine is back 2012-02-01 19:49:28 +04:00
inet_diag.h Trivial whitespace cleanup 2012-01-30 21:29:42 +04:00
ipc_ns.h ips_ns.h: Add CR_ prefix to header defines 2012-02-01 14:39:01 +04:00
libnetlink.h net: Define named constant for nlmsg_seq 2011-12-27 20:13:18 +04:00
list.h list: Cleanup spaces/tabs mess 2012-02-01 14:38:49 +04:00
lock.h lock: add a new primitive cr_wait_until_greater (v2) 2012-01-19 16:16:58 +04:00
log.h Move logging functions to log.c 2011-12-19 18:52:50 +04:00
namespaces.h namespaces: parametrized namespace option introduced 2012-01-31 22:32:22 +04:00
parasite-syscall.h parasite: Dump misc command 2012-01-30 12:59:54 +04:00
parasite.h parasite: transfer image fd in parasite 2012-02-01 19:26:58 +04:00
proc_parse.h ctrools: Rewrite task/threads stopping engine is back 2012-02-01 19:49:28 +04:00
ptrace.h ctrools: Rewrite task/threads stopping engine is back 2012-02-01 19:49:28 +04:00
restorer-log.h restorer: move log descriptor from crtools (v2) 2012-01-17 18:08:03 +03:00
restorer.h cr: Task creds support 2012-01-30 13:00:50 +04:00
sockets.h show: inet sockets dump parsing support added 2012-01-18 12:39:04 +04:00
syscall-codes.h util: add socket syscalls 2012-02-01 19:26:33 +04:00
syscall.h util: add socket syscalls 2012-02-01 19:26:33 +04:00
types.h syscalls: Prepare syscalls and bits for (mostly) setting creds 2012-01-30 13:00:33 +04:00
unix_diag.h sockets: Update unix_diag.h 2012-01-10 17:26:50 +04:00
util-net.h util: move recv_fd and send_fd in a separate file 2012-02-01 19:26:41 +04:00
util.h Annotate printk with printf attribute 2012-01-31 15:56:33 +04:00
uts_ns.h namespaces: split UTS and generic code 2012-01-31 13:43:28 +04:00