Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/checkpoint-restore/criu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBui Quang Minh <minhquangbui99@gmail.com>2022-11-03 18:04:53 +0300
committerAndrei Vagin <avagin@gmail.com>2022-11-12 04:35:34 +0300
commit52435d72b8bb205ec7ccfb8a988b01c9b20c3cc1 (patch)
tree54101ed6a8dcef5dae17554bed3de8aee97c7ef2
parent614fb7de02f72a486c532b2124a4334de3c307e5 (diff)
cgroup: Remove redundant code that handles zombie tasksHEADcriu-dev
Zombie tasks are dumped in dump_zombies() so it is redundant to handle them in dump_one_task(). Deprecate cg_set in task_core_entry as this field must be per thread now. Signed-off-by: Bui Quang Minh <minhquangbui99@gmail.com>
-rw-r--r--criu/cr-dump.c9
-rw-r--r--criu/cr-restore.c7
-rw-r--r--images/core.proto1
3 files changed, 6 insertions, 11 deletions
diff --git a/criu/cr-dump.c b/criu/cr-dump.c
index e31b2f702..63eb627fc 100644
--- a/criu/cr-dump.c
+++ b/criu/cr-dump.c
@@ -811,16 +811,7 @@ static int dump_task_core_all(struct parasite_ctl *ctl, struct pstree_item *item
goto err;
}
- /*
- * We don't support multithreads zombie tasks so there is
- * no thread_core in zombie tasks, store the cg_set in
- * task_core in these cases.
- */
cg_set = &core->thread_core->cg_set;
- if (item->pid->state == TASK_THREAD) {
- core->tc->has_cg_set = true;
- cg_set = &core->tc->cg_set;
- }
ret = dump_thread_cgroup(item, cg_set, info, -1);
if (ret)
goto err;
diff --git a/criu/cr-restore.c b/criu/cr-restore.c
index 78f2a9701..974202f16 100644
--- a/criu/cr-restore.c
+++ b/criu/cr-restore.c
@@ -1350,9 +1350,12 @@ static inline int fork_with_pid(struct pstree_item *item)
item->pid->state = ca.core->tc->task_state;
- /* Zombie task's cg_set is stored in task_core */
+ /*
+ * Zombie tasks' cgroup is not dumped/restored.
+ * cg_set == 0 is skipped in prepare_task_cgroup()
+ */
if (item->pid->state == TASK_DEAD)
- rsti(item)->cg_set = ca.core->tc->cg_set;
+ rsti(item)->cg_set = 0;
else
rsti(item)->cg_set = ca.core->thread_core->cg_set;
diff --git a/images/core.proto b/images/core.proto
index 1ee32bfda..bc8b7a488 100644
--- a/images/core.proto
+++ b/images/core.proto
@@ -40,6 +40,7 @@ message task_core_entry {
optional task_timers_entry timers = 7;
optional task_rlimits_entry rlimits = 8;
+ /* This is deprecated, should be per-thread */
optional uint32 cg_set = 9;
optional signal_queue_entry signals_s = 10;