This patchset adds the possibility to set template control group, which is used
as a template for some group of control groups.
Template group can be created on-fly, when cgroup_change_cgroup_flags call want
to use control group based on template name which does not
Template group is a group which name contains template string - that means a
string which contains %U, %u, %G, %g, %P or %p tag(s).
rules which uses template groups can be specified in cgrules.conf:
e.g.:
@students cpu,cpuacct students/%u
template group specification can be done using cgconfig.conf file (they have to
have keyword template):
e.g.:
template students/%u {
cpuacct{
}
cpu {
}
}
For now all control groups which are necessary for creating template group and
which are not present are created with the default kernel va
The templates can be cached (the similar way as rules) to prevent to read
config file too often. SIGUSR1 reload the template cache.
Documentation is updated to reflect this changes.
---
Ivana Hutarova Varekova (8):
update documentation to reflect the changes regarding templates
cgroup_change_cgroup_flags: use templates if they are in rules
cgrulesengd: cache templates
api: add function for creating template control groups
config.h: create function for init/reload cgconfig template cache
cgconfig.conf: parse template tag and fill relevant structures
cgconfigparser: add template tag to cgconfigparser
cgroup_change_cgroup_flags: create template control group on the fly
README_daemon | 8 +
doc/man/cgconfig.conf.5 | 54 +++++
doc/man/cgexec.1 | 8 +
doc/man/cgrules.conf.5 | 25 ++
doc/man/cgrulesengd.8 | 1
include/libcgroup/config.h | 30 +++
include/libcgroup/tasks.h | 4
src/api.c | 173 +++++++++++++++
src/config.c | 492 +++++++++++++++++++++++++++++++++++++++++---
src/daemon/cgrulesengd.c | 41 ++++
src/daemon/cgrulesengd.h | 7 +
src/lex.l | 3
src/libcgroup-internal.h | 7 +
src/libcgroup.map | 6 +
src/parse.y | 136 ++++++++++++
15 files changed, 953 insertions(+), 42 deletions(-)
--
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel