On Tue, Oct 18, 2016 at 12:01:01AM +0200, Thomas Gleixner wrote:
> > +   /* Don't allow if there are processes in this group */
> > +   read_lock(&tasklist_lock);
> > +   for_each_process(p) {
> > +           if (p->closid == rdtgrp->closid) {
> > +                   read_unlock(&tasklist_lock);
> > +                   rdtgroup_kn_unlock(kn);
> > +                   return -EBUSY;
> > +           }
> > +   }
> > +   read_unlock(&tasklist_lock);
> 
> I wonder, whether we should simply give those tasks back to the default
> group, same as we do with the cpus.

Leftover inherited semantics from the cgroup version. It would
simplify the code here (one less error case to handle) if we
did drop this.  I can't come up with a good reason why we'd
want to make the rmdir fail. I can imagine that a sysadmin
dealing with an application that is a fork bomb being happy
about not having to race to move things out so they can do the
rmdir.

-Tony

Reply via email to