[Devel] [PATCH v10 6/9] ve/cgroup: unmark ve-root cgroups at container stop
Pavel Tikhomirov
ptikhomirov at virtuozzo.com
Fri Apr 17 10:59:12 MSK 2020
> @@ -4237,6 +4266,19 @@ void cgroup_mark_ve_roots(struct ve_struct *ve)
> mutex_unlock(&cgroup_mutex);
> }
>
> +void cgroup_unmark_ve_roots(struct ve_struct *ve)
> +{
> + struct cgroup *cgrp;
> + struct cgroupfs_root *root;
> +
> + mutex_lock(&cgroup_mutex);
> + for_each_active_root(root) {
> + cgrp = css_cgroup_from_root(ve->root_css_set, root);
Maybe we can use this new helper in cgroup_mark_ve_roots too for
consistency (maybe in separate patch), what do you think?
> + clear_bit(CGRP_VE_ROOT, &cgrp->flags);
> + }
> + mutex_unlock(&cgroup_mutex);
> +}
> +
> struct cgroup *cgroup_get_ve_root(struct cgroup *cgrp)
> {
> struct cgroup *ve_root = NULL;
--
Best regards, Tikhomirov Pavel
Software Developer, Virtuozzo.
More information about the Devel
mailing list