]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
Use cache when calling cgroup_change_cgroup_flags()
authorPeter Schiffer <pschiffe@redhat.com>
Mon, 14 Oct 2013 06:49:34 +0000 (08:49 +0200)
committerPeter Schiffer <pschiffe@redhat.com>
Mon, 14 Oct 2013 06:49:34 +0000 (08:49 +0200)
commit9a5be0d9530a81c386ddd3ddaa264d3e04e6b1fd
tree6e158085f5a5d0d36c35daeff95a27371b2926d2
parent83248a9edad920e1ceb879bc26ef155a9554617c
Use cache when calling cgroup_change_cgroup_flags()

When system contains cgrules.conf file with few thousand rules,
cgroup_change_cgroup_flags() function without CGFLAG_USECACHE flag is very
slow.

As Ivana pointed out, cgexec and cgclassify tools might have problems with
cache
reloading, so I've removed them from the patch for now.

Currently, the patch affects only cgrulesengd daemon. Testing was done with
approximately 4000 users, rules in cgrules.conf file and same amount of
entries
in cgconfig.conf. Without the CGFLAG_USECACHE the cgrulesengd is starting
for
about 15 - 20 minutes (this is because of cgroup_change_all_cgroups()
function,
which scans all running processes on cgrulesengd start).

Signed-off-by: Peter Schiffer <pschiffe@redhat.com>
Acked-by: Ivana Hutarova Varekova <varekova@redhat.com>
src/api.c