* Nikunj A. Dadhania <[email protected]> [2010-08-02 11:12:11]:
> Hi All,
>
> This is with reference to the Layer-2 patches that Dhaval had posted sometime
> back. [1][2]
>
> There has been a lot of discussions on this mailing list regarding libcgroup
> adoption. I would like to work on this further to get the library integrated
> to projects exploiting cgroups fs directly.
>
> IMHO, Current libcgroup tree and the above Layer-2 patches addresses few of
> the concerns that were raised during the discussions:
>
> Addressed
> - Does not expose lot of structures to the application, provide accessors.
> - Out of the box support of latest libcgroup version in the distro.
> - Application should not care about controllers
> - Application should not care what they(memory.limit_in_bytes) are called
> in
> the CGroup FS.
> - Application should not care of what data type/format is stored in FS
> - Path creation API instead of calling multiple calls to create a hierarchy
>
> 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
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
b. The layer2 API would have some common abstractions like
set_hard_limit
get_hard_limit
set_soft_limit
get_soft_limit
....
get_stats
Each of these would take a controller value and in turn invoke
callbacks into the layer 2 code.
c. The layer 2 code would enable layer2 wrappers to all file based control
points we have. Applications would be free to use the wrappers or if
they need to be generic use (b) above.
Just the first thoughts.
--
Three Cheers,
Balbir
------------------------------------------------------------------------------
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