Re: [lxc-devel] [PATCH 1/1] cgroupfs: support older kernels without cgroup.clone_children

2014-01-23 Thread Robert Vogelgesang
Hi Serge, On Thu, Jan 23, 2014 at 11:28:46AM -0600, Serge Hallyn wrote: > Quoting Robert Vogelgesang (vo...@users.sourceforge.net): > > > +static long get_value(const char *dir, const char *file) > > > +{ > > > + FILE *f; > > > + char path[MAXPATHLEN]; > > > + int ret, retv; > > > + > > > + retv =

Re: [lxc-devel] [PATCH 1/1] cgroupfs: support older kernels without cgroup.clone_children

2014-01-23 Thread Serge Hallyn
Quoting Robert Vogelgesang (vo...@users.sourceforge.net): > > +static long get_value(const char *dir, const char *file) > > +{ > > + FILE *f; > > + char path[MAXPATHLEN]; > > + int ret, retv; > > + > > + retv = snprintf(path, MAXPATHLEN, "%s/%s", dir, file); > > + if (retv < 0 || retv >=

Re: [lxc-devel] [PATCH 1/1] cgroupfs: support older kernels without cgroup.clone_children

2014-01-23 Thread Serge Hallyn
Quoting Robert Vogelgesang (vo...@users.sourceforge.net): > Hi Serge, > > your patch uses the same concept as mine, but it won't work, as noted > below. > > If you can wait until Monday, I could send you a cleaned-up and tested > version of my patch; I have to do other things today and tomorrow.

Re: [lxc-devel] [PATCH 1/1] cgroupfs: support older kernels without cgroup.clone_children

2014-01-23 Thread Robert Vogelgesang
Hi Serge, your patch uses the same concept as mine, but it won't work, as noted below. If you can wait until Monday, I could send you a cleaned-up and tested version of my patch; I have to do other things today and tomorrow. On Wed, Jan 22, 2014 at 10:49:00AM -0600, Serge Hallyn wrote: > When c

Re: [lxc-devel] [PATCH 1/1] cgroupfs: support older kernels without cgroup.clone_children

2014-01-22 Thread Serge Hallyn
Quoting Stéphane Graber (stgra...@ubuntu.com): > On Wed, Jan 22, 2014 at 10:49:00AM -0600, Serge Hallyn wrote: > > When creating a cgroup, detect whether cgroup.clone_children > > exists. If not, then manually copy the parent's cpuset.cpus > > and cpuset.mems values. > > > > Signed-off-by: Serge

Re: [lxc-devel] [PATCH 1/1] cgroupfs: support older kernels without cgroup.clone_children

2014-01-22 Thread Stéphane Graber
On Wed, Jan 22, 2014 at 10:49:00AM -0600, Serge Hallyn wrote: > When creating a cgroup, detect whether cgroup.clone_children > exists. If not, then manually copy the parent's cpuset.cpus > and cpuset.mems values. > > Signed-off-by: Serge Hallyn We may want to go through our list of helper func

[lxc-devel] [PATCH 1/1] cgroupfs: support older kernels without cgroup.clone_children

2014-01-22 Thread Serge Hallyn
When creating a cgroup, detect whether cgroup.clone_children exists. If not, then manually copy the parent's cpuset.cpus and cpuset.mems values. Signed-off-by: Serge Hallyn --- src/lxc/cgroup.c | 72 1 file changed, 72 insertions(+) diff