[CRIU] [PATCH 0/6] collect all pid-s in rbtree (v2)
Andrey Vagin
avagin at openvz.org
Thu Mar 10 11:24:37 PST 2016
From: Andrew Vagin <avagin at virtuozzo.com>
Currently our pid allocator is too simple, it returns max_pid++
and it may return a value which is bigger than kernel.pid_map.
With this patches we have a sorted array of pid-s and we can find
free pid-s very fast.
In addition, we can find a pstree_item by pid faster (O(log n) instead of O(n)).
https://jira.sw.ru/browse/PSBM-42202
v2: fix comments from Pavel.
Andrew Vagin (6):
pstree: move state from pstree_item to pid
pstree: split alloc_pstree_helper
pstree: prepare to store all pid-s in rb-tree
pstree: resort code about abandoned tasks
pstree: try to find a free pid between busy pids (v2)
pstree: use rbtree to find a specified pid (v2)
criu/cr-dump.c | 16 ++--
criu/cr-restore.c | 22 ++---
criu/files-reg.c | 17 ++--
criu/image.c | 2 +-
criu/include/image.h | 2 +
criu/include/pid.h | 5 ++
criu/include/pstree.h | 7 +-
criu/pstree.c | 241 ++++++++++++++++++++++++++++++++++++--------------
criu/seccomp.c | 2 +-
criu/seize.c | 16 ++--
10 files changed, 224 insertions(+), 106 deletions(-)
--
2.5.0
More information about the CRIU
mailing list