Quoting Ryota Ozaki (ozaki.ryota(a)gmail.com):
I've updated the patch. The change includes support for multiple
mount
points of cgroups that I didn't cope with in the previous patch.
Through the work, I found a bit messy problem. Current lxc controller writes
pid in a 'tasks' file multiple times if one mount point has multiple subsystems.
It is bad because the first write changes the cgroups path of a controller, and
then the second write points a missing file like
$CGROUPS_MOUNTPOINT/<path_to_domain>/<path_to_domain>/tasks where
the correct file is $CGROUPS_MOUNTPOINT/<path_to_domain>/tasks.
I did workaround this problem with a tricky way by truncating the
duplicated path.
We probably need a more feasible solution.
Seems like the loop in virCgroupAddTask() should just keep track
of which hierarchies it has already written to. Just a small
temporary hash table or for that matter a small array that you
walk linearly...
-serge