[Devel] [PATCH rh7] cgroups: Drop virtualization code, v3

Cyrill Gorcunov gorcunov at odin.com
Wed May 6 10:21:22 PDT 2015


On Wed, May 06, 2015 at 08:04:02PM +0300, Vladimir Davydov wrote:
> On Wed, May 06, 2015 at 11:57:08AM +0300, Cyrill Gorcunov wrote:
> > Here we rip off all the virtualization code we introduced into kernel to
> > behave close to rhel6.
> > 
> > Because we're trying a new concept (bindmounting from the node) it is
> > no longer needed.
> > 
> > Now some details:
> > 
> >  - drop cgroup_show_path -- we don't hide VEID in /proc/self/cgroup output,
> >    it doesn't break criu so no need to carry it, same applies to changes
> >    in cgroup_path;
> > 
> >  - because we drop virtualization of systemd -- disable creation of new
> >    hierarchies in container: we don't support it, neither we need it. The
> >    primary reason why we allowed new hierarchies in container was that
> >    CRIU has been running restore procedure inside VE but now we initiate
> >    restore from VE0, so we can safely disable new hierarchies;
> > 
> >  - in cgroup_addrm_files go back to former RHEL7 code; if we need something
> >    special here it must be reviewed carefully and separately;
> > 
> >  - no need to hide /proc/cgroups in VE, there is no sensible info present.
> > 
> > v2:
> > 
> >  - take into account commits 38f039db6e023ac14517219ad6f674633c4e99ca
> >    and c2ac6df22b20389ae2d0af49c436b00ff3243e89 removing cgroup_is_disposable,
> >    cgroup_kernel_destroy, ve::ve_cgroup_head.
> > 
> >  - drop GRPP_WEAK, CGRP_SELF_DESTRUCTION and CGRP_VE_TOP_CGROUP_VIRTUAL flags
> >    which implies the cgroups no longer auto-cleaned up but user-space tool
> >    (read vzctl and friends) should handle cgroups removal
> > 
> >  - because we're moving to native cgroups code we don't virtualize release
> >    agent anymore
> > 
> >  - still cgroup::cgroup_ve member is needed because we're using it
> >    all over the code
> 
> Where do we use it? I think you're mixing it up with the cgroup_ve()
> macro, which has nothing to do with the ->cgroup_ve cgroup struct
> member.

cgroup_release_agent:

		err = call_usermodehelper_ve(cgrp->root->top_cgroup.cgroup_ve,
					     argv[0], argv, envp,
					     UMH_WAIT_EXEC);

or we no longer need it?

> >  	return (cgrp->flags & bits) > (1 << CGRP_RELEASABLE);
> 
> Before commit 38f039db6e023ac14517219ad6f674633c4e99ca we had
> 
> -       return (cgrp->flags & bits) == bits;
> 
> here. Fix please.

Sure thanks!

> 
> >  }
> >  
> [...]
> > @@ -5774,7 +5621,6 @@ EXPORT_SYMBOL(cgroup_kernel_close);
> >  
> >  void cgroup_kernel_destroy(struct cgroup *cgrp)
> 
> We don't use this function anymore. Remove it please.

Yeah, thanks again!



More information about the Devel mailing list