[CRIU] [PATCH 3/3] helpers: Create helpers with shared files and fs

Pavel Emelyanov xemul at parallels.com
Fri Sep 12 05:43:20 PDT 2014


They don't change these objects, so can share them
with parent (will be created slightly faster :) ).

The plan is to make them CLONE_VM, but it's not that
easy.

Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
---
 pstree.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/pstree.c b/pstree.c
index d005b64..cef79b8 100644
--- a/pstree.c
+++ b/pstree.c
@@ -455,6 +455,7 @@ static int prepare_pstree_ids(void)
 		helper->pid.virt = item->sid;
 		helper->state = TASK_HELPER;
 		helper->parent = root_item;
+		helper->rst->clone_flags = CLONE_FILES | CLONE_FS;
 		list_add_tail(&helper->sibling, &helpers);
 		task_entries->nr_helpers++;
 
@@ -575,6 +576,7 @@ static int prepare_pstree_ids(void)
 		helper->pid.virt = item->pgid;
 		helper->state = TASK_HELPER;
 		helper->parent = item;
+		helper->rst->clone_flags = CLONE_FILES | CLONE_FS;
 		list_add(&helper->sibling, &item->children);
 		task_entries->nr_helpers++;
 		item->rst->pgrp_leader = helper;
-- 
1.8.4.2




More information about the CRIU mailing list