Re: [libvirt] [PATCH 1 of 2] Add internal cgroup manipulation functions

2008-10-03 Thread Dan Smith
BS> There is no support for permissions, is everything run as root? The LXC driver must run as root, yes. BS> Is 512 arbitrary? How do we know it is going to be sufficient? This should probably be a constant, but it's more than enough for any of the values we're setting. Defining it specificall

Re: [libvirt] [PATCH 1 of 2] Add internal cgroup manipulation functions

2008-10-03 Thread Balbir Singh
Dan Smith wrote: > This patch adds src/cgroup.{c,h} with support for creating and manipulating > cgroups. It's quite naive at the moment, but should provide something to > work with to move forward with resource controls. > > All groups created with the internal API are forced under $mount/libvir

[libvirt] [PATCH 1 of 2] Add internal cgroup manipulation functions

2008-10-03 Thread Dan Smith
This patch adds src/cgroup.{c,h} with support for creating and manipulating cgroups. All groups created with the internal API are forced under $mount/libvirt/ to keep everything together. The first time a group is created, the libvirt directory is also created, and the settings from the root are

Re: [libvirt] [PATCH 1 of 2] Add internal cgroup manipulation functions

2008-10-03 Thread Dan Smith
DV> I have ony one stylistic issue, which is that I usually prefer to DV> have the comment about the funtions and its parameter in the C DV> code rather than on the header (keeping it closer to the code DV> means one more easilly update/fix it, and if you use something DV> like ctags to get to the

Re: [libvirt] [PATCH 1 of 2] Add internal cgroup manipulation functions

2008-10-03 Thread Daniel Veillard
On Wed, Oct 01, 2008 at 01:19:03PM -0700, Dan Smith wrote: > This patch adds src/cgroup.{c,h} with support for creating and manipulating > cgroups. > > All groups created with the internal API are forced under $mount/libvirt/ > to keep everything together. The first time a group is created, the l

Re: [libvirt] [PATCH 1 of 2] Add internal cgroup manipulation functions

2008-10-02 Thread Daniel P. Berrange
On Wed, Oct 01, 2008 at 11:10:33PM +0100, Daniel P. Berrange wrote: > On Wed, Oct 01, 2008 at 02:11:24PM -0700, Dan Smith wrote: > > DB> Rather than rely on this virt type string - virt type is not > > DB> adding enough uniqueness - can still have a (virttype, name) clash > > DB> between 2 libvirt

Re: [libvirt] [PATCH 1 of 2] Add internal cgroup manipulation functions

2008-10-01 Thread Dan Smith
DB> Both, Xen and QEMU drivers support a virt type of 'hvm'. Ah, gotcha. I didn't realize that just looking at the enum. I've changed it locally. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: [EMAIL PROTECTED] pgpewM4wFGN22.pgp Description: PGP signature -- Libvir-lis

Re: [libvirt] [PATCH 1 of 2] Add internal cgroup manipulation functions

2008-10-01 Thread Daniel P. Berrange
On Wed, Oct 01, 2008 at 02:11:24PM -0700, Dan Smith wrote: > DB> Rather than rely on this virt type string - virt type is not > DB> adding enough uniqueness - can still have a (virttype, name) clash > DB> between 2 libvirt drivers. Name is unique per host, per driver, so > DB> we'd want to have >

Re: [libvirt] [PATCH 1 of 2] Add internal cgroup manipulation functions

2008-10-01 Thread Dan Smith
DB> Rather than rely on this virt type string - virt type is not DB> adding enough uniqueness - can still have a (virttype, name) clash DB> between 2 libvirt drivers. Name is unique per host, per driver, so DB> we'd want to have DB> $CONTROLLER_MOUNT/libvirt/$DRIVER_NAME/$DOMAIN_NAME Hmm, I'm no

Re: [libvirt] [PATCH 1 of 2] Add internal cgroup manipulation functions

2008-10-01 Thread Daniel P. Berrange
On Wed, Oct 01, 2008 at 01:19:03PM -0700, Dan Smith wrote: > This patch adds src/cgroup.{c,h} with support for creating and manipulating > cgroups. > > All groups created with the internal API are forced under $mount/libvirt/ > to keep everything together. The first time a group is created, the l

[libvirt] [PATCH 1 of 2] Add internal cgroup manipulation functions

2008-10-01 Thread Dan Smith
This patch adds src/cgroup.{c,h} with support for creating and manipulating cgroups. All groups created with the internal API are forced under $mount/libvirt/ to keep everything together. The first time a group is created, the libvirt directory is also created, and the settings from the root are

Re: [libvirt] [PATCH 1 of 2] Add internal cgroup manipulation functions

2008-09-30 Thread Dan Smith
DB> My thought on the overall design of this internal API is that it DB> is too low level & pushing too much work to the caller. eg, the DB> caller would have to lookup virCGroupPtr objects for each DB> controller it cares about, Well, that's not what I had in mind, actually. DB> and has to remem

Re: [libvirt] [PATCH 1 of 2] Add internal cgroup manipulation functions

2008-09-30 Thread Daniel P. Berrange
On Mon, Sep 29, 2008 at 09:40:42AM -0700, Dan Smith wrote: > This patch adds src/cgroup.{c,h} with support for creating and manipulating > cgroups. It's quite naive at the moment, but should provide something to > work with to move forward with resource controls. > > All groups created with the i

[libvirt] [PATCH 1 of 2] Add internal cgroup manipulation functions

2008-09-29 Thread Dan Smith
This patch adds src/cgroup.{c,h} with support for creating and manipulating cgroups. It's quite naive at the moment, but should provide something to work with to move forward with resource controls. All groups created with the internal API are forced under $mount/libvirt/ to keep everything toget