[Devel] [PATCH v10 7/9] ve/cgroup: moved cgroup release notifications to per-ve workqueues.

Pavel Tikhomirov ptikhomirov at virtuozzo.com
Fri Apr 17 11:40:19 MSK 2020


> @@ -1651,6 +1683,7 @@ static struct dentry *cgroup_mount(struct file_system_type *fs_type,
>   		const struct cred *cred;
>   		int i;
>   		struct css_set *cg;
> +		root_cgrp->ve_owner = get_exec_env();

Host's root cgroup running release agent in container because it was 
first mounted in container looks strange for me. Also what will happen 
after this ve exits and is removed?

Maybe always set ve0 here ("= ve0;") instead?

I understand that implicitly we would have ve0 anyway because one can't 
mount cgroups in CT, but lets be explicit =)

>   
>   		BUG_ON(sb->s_root != NULL);
>   
> @@ -4258,6 +4291,7 @@ void cgroup_mark_ve_roots(struct ve_struct *ve)
>   	mutex_lock(&cgroup_mutex);
>   	for_each_active_root(root) {
>   		cgrp = task_cgroup_from_root(ve->init_task, root);
> +		cgrp->ve_owner = ve;
>   		set_bit(CGRP_VE_ROOT, &cgrp->flags);
>   
>   		if (test_bit(cpu_cgroup_subsys_id, &root->subsys_mask))


More information about the Devel mailing list