On Thu, May 06, 2010 at 08:56:27PM +0530, Balbir Singh wrote: > > + if (memory_hierarchy && > > + group->controllers[VIR_CGROUP_CONTROLLER_MEMORY].mountPoint != NULL && > > + (i == VIR_CGROUP_CONTROLLER_MEMORY || > > + STREQ(group->controllers[i].mountPoint, group->controllers[VIR_CGROUP_CONTROLLER_MEMORY].mountPoint))) { > > + rc = virCgroupSetMemoryUseHierarchy(group); > > + if (rc != 0) { > > + VIR_FREE(path); > > + break; > > + } > > + } > > } > > > > VIR_FREE(path); > > @@ -553,7 +594,7 @@ static int virCgroupAppRoot(int privileged, > > if (rc != 0) > > goto cleanup; > > > > - rc = virCgroupMakeGroup(rootgrp, *group, create); > > + rc = virCgroupMakeGroup(rootgrp, *group, create, 0); > > > > cleanup: > > virCgroupFree(&rootgrp); > > @@ -653,7 +694,7 @@ int virCgroupForDriver(const char *name, > > VIR_FREE(path); > > > > if (rc == 0) { > > - rc = virCgroupMakeGroup(rootgrp, *group, create); > > + rc = virCgroupMakeGroup(rootgrp, *group, create, 0); > > if (rc != 0) > > virCgroupFree(group); > > } > > @@ -703,7 +744,7 @@ int virCgroupForDomain(virCgroupPtr driver, > > VIR_FREE(path); > > > > if (rc == 0) { > > - rc = virCgroupMakeGroup(driver, *group, create); > > + rc = virCgroupMakeGroup(driver, *group, create, 1); > > if (rc != 0) > > virCgroupFree(group); > > } > > A comment on why Domains get hierarchy support and Drivers don't will > help unless it is very obvious to developers. We never need to query the cummulative usage for the driver as a whole, only query individual VMs. So it would just be adding overhead to track it Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list