[libvirt] [PATCH 2 of 2] Use cgroup functions to set resource limits on LXC domains

Daniel P. Berrange berrange at redhat.com
Fri Oct 3 16:24:30 UTC 2008

On Fri, Oct 03, 2008 at 07:45:24AM -0700, Dan Smith wrote:
> DV> creating a domain is always the trickiest part of domain lifecycle
> DV> and setting up the framework is often something a bit obfuscated,
> DV> nearly by definition. But if we could associate meaningful
> DV> constants to the device policies here, this would help people
> DV> having to improve or debug that code in the future ;-)
> Okay, I suppose that if the QEMU driver ends up doing something
> similar, the constants would be reused.

Possibly - for QEMU we'd need to drive device ACL's off the list of
configured disks in the XML - we'd probably just 'stat()' them to
lookup their major/minor numbers at time of launch.

> Should they go in cgroup.h since they're expected to be used with that
> interface?

If needing to be shared, I'd suggest util.h since that has a collection
of file/filesystem related utility functions.

|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

More information about the libvir-list mailing list