[CRIU] [PATCH 03/10] cgroup: only collect cgsets once
Pavel Emelyanov
xemul at virtuozzo.com
Thu Mar 3 02:49:18 PST 2016
Applied as bug fix, but have one question:
> @@ -685,7 +688,7 @@ int dump_task_cgroup(struct pstree_item *item, u32 *cg_id, struct parasite_dump_
> if (parse_task_cgroup(pid, args, &ctls, &n_ctls))
> return -1;
>
> - cs = get_cg_set(&ctls, n_ctls);
> + cs = get_cg_set(&ctls, n_ctls, &existed);
> if (!cs)
> return -1;
>
> @@ -705,7 +708,7 @@ int dump_task_cgroup(struct pstree_item *item, u32 *cg_id, struct parasite_dump_
> * The on-stack ctls is moved into cs inside
> * the get_cg_set routine.
> */
> - if (cs != criu_cgset && collect_cgroups(&cs->ctls))
> + if (cs != criu_cgset && !existed && collect_cgroups(&cs->ctls))
> return -1;
> }
>
Maybe it's better to call collect_cgroups() right in get_cg_set()?
More information about the CRIU
mailing list