On Mon, Aug 2, 2010 at 12:31 PM, Nikunj A. Dadhania <[email protected]> wrote: > On Mon, 2 Aug 2010 11:47:20 +0530, Balbir Singh <[email protected]> > wrote: >> * Nikunj A. Dadhania <[email protected]> [2010-08-02 11:12:11]: >> >> > To do: >> > - A clean patch for libvirt to switch to libcgroup. >> > - Application to be provided a single handle which can be used for >> > further >> > cgroup API calls. >> > >> >> I think this is a good step forward, as a first step, could we list >> >> 1. cgroup API's being used by libvirt and lxc and systemd - look at >> them for abstractions to create > > Current implementation of libvirt is using following cgroup functionality: > 1) to create cgroup directory > a) Creating libvirt or libvirt-`username` > b) Creating driver cgroup libvirt/lxc or libvirt/qemu > c) Creating cgroup per VM in the respective driver > > 2) to add task to cgroup > 3) to set memory limit > 4) to read current memory usage > 5) to allow/deny devices > 6) to set/get CPU Shares > 7) to get CPU usage > 8) to set/get freezer state > 9) to remove cgroup directory > > I still do not have the list for systemd. >
Don't worry about systemd. Lennart sets everything up very early. I am working now on gettign the rest of his APIs working. And I finally have internet access again, so I should start pushing them out soonish. >> >> This is what I had in mind >> >> a. Build a plugin interface, on cgroup_init() it would detect mounted >> controllers and activate the layer2 API for each of the controllers > Could you please elaborate on this? > >> b. The layer2 API would have some common abstractions like >> >> set_hard_limit >> get_hard_limit >> set_soft_limit >> get_soft_limit >> .... >> get_stats > This would be different per controller, right? > >> Each of these would take a controller value and in turn invoke >> callbacks into the layer 2 code. > I am not too sure about this, as every controller has different parameters to > control. > void * :-) Dhaval ------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm _______________________________________________ Libcg-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libcg-devel
