| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Jan Safranek <jsafrane@redhat.com>
Using plain DEBUG can be dangerous, it might have side effects on different
libraries, there should be something with CGROUP_ prefix.
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@325 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Ankita Garg <ankita@in.ibm.com>
This patch adds human readable error messages to the configuration parser.
The error lookup is implemented as a simple table, indexed by the error.
TODO: Save errno at ECGOTHER and pass it down as cgroup_lasterror.
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Signed-off-by: Ankita Garg <ankita@in.ibm.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@228 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since we will not deprecate API now, and will do so with the
next release, let's include this one in and get the API right.
With this pathc, we now return int type, and the pointer passed
as the argument redirects to the cgroup we are reading.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@202 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and configuration enhancements. Primarliy Initiated by Dhaval Giani
Please see svn log of all branches/balbir-config-cleanup
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@201 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
classify tasks. It is useful for an application to know where it has
been classified. I propose to add a new API
cgroup_get_current_controller_path() that returns the current
classification directory for the specified controller. One can easily
add on and build new API that will return paths of all mounted
controllers, but I want to start with something simple and useful.
I've also added a bunch of test cases for the same purpose.
Test output
# ./pathtest.sh
Test FAIL, get path failed for controller cpuset
Test PASS, controller cpu path /default
Test PASS, controller cpuacct path /default
Test PASS, controller memory path /default
Test FAIL, get path failed for controller memrlimit
I mounted just cpu, cpuacct and memory, thus the path for cpuset and
memrlimit could not be found (as expected).
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Reviewed-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@200 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
| |
Signed-off-by: Steve Olivieri <sjo@redhat.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@190 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
with a modified version of libcg_ba (basic acceptance tests), that I'll send
out later. I've also fixed a couple of bugs, I'll list them in order and
if desired, I'll split out the patches so that the enhancements can be
separate from the bug fixes
1. Fix cg_create_control_group() to succeed if the directory already exists
2. We can't always append a control_file, we need to open it "r+"
3. It's OK for writing values to a control_file to fail, since some of
them are read-only and some may not exist in hierarchies below the root
4. Skip over directories while trying to read control file's name value pairs
5. In cg_rd_ctlr_file we don't allocate any memory to value, directly fscanf
into it, that's been fixed
6. There might be more fixes that might already be present in trunk, since
I hope I've not redone a lot of the fixes, I had branched of trunk very
recently
Changelog v2
------------
1. Refactor cgroup_free_controllers() and use it in
cgroup_create_cgroup_from_parent()
2. Check for strdup failure
3. Check if dst == src
TODO:
1. Use cg_add_controller() API
2. Use cg_add_value_string() API
I'll send out patches for the TODOs later.
I've also updated the basic acceptance test (libcg_ba.cpp)
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@165 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
| |
Various libcgroup api cleanups as suggested by balbir during code review
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@159 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Vivek Goyal <vgoyal@redhat.com>
Enhancement to libcg to do following.
- Parse the /etc/cgrules.conf file and place the task in the right cgroup.
- Exported two APIs which can place the task based on /etc/cgrules.conf
or based on cgroup explicitly specified by the caller.
- There can be multiple users.
- PAM module (pam_cgroup)
- cgexec tool
- cgclassify tool
- APIs can be directly used by other cgroup aware user progarams.
- Classification daemon
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@136 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Dhaval, wanted a patch with -p1 generated so that he can apply it and
use it with quilt. Here goes
Testing
Tested with samples/cgconfig.conf (NOTE: expects user balbir to be
present on the system, feel free to change and test).
TODO
1. Add hooks for other controllers, namely memory, cpuacct and cpuset
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@134 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adding in APIs which allow you to set and get values from a cgroup
controller. Use cgroup_get_controller to get a controller, and then
use cgroup_?et_value_* API for your requirement.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@126 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch breaks API. There are no known users at the moment so
it is fine.
cgroup_new_cgroup now takes in only a name argument. The uids and
gids are set by a new API, cgroup_?et_uid_gid()
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@125 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
| |
Allows you to compare two cgroups. Their values need to be
equal. NULL cgroups are invalid.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@124 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New API to get the cgroup datastructure from the mounted filesystem.
It accepts the cgroup datastructure with the name of the cgroup
which has to populated across various mountpoints.
TODO:
More testing.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Cc: Dan Smith <danms@us.ibm.com>
Cc: Paul Menage <menage@google.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@117 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
|
| |
From: Vivek Goyal <vgoyal@redhat.com>
Introduce new error code ECGOTHER
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@116 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
| |
We don't want to return errno as those results. Setting it to
return a libcgroup error value.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@108 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes the spell mistake in enum value in the header file
and libcg api file.
Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@84 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
| |
v0.1c.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/tags/v0.1c@76 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
|
|
|
|
|
|
|
|
|
| |
spec file based on bugzilla input. Removed %makeinstall
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/tags/v0.1b@67 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|
|
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/tags/v0.1b@49 4f4bb910-9a46-0410-90c8-c897d4f1cd53
|