]>
git.ipfire.org Git - thirdparty/libcgroup.git/log
Dhaval Giani [Fri, 15 Aug 2008 05:14:12 +0000 (05:14 +0000)]
libcgroup testcases: fix small testcase issue
From: Sudhir Kumar <skumar@linux.vnet.ibm.com>
This patch fixes a small mistake in the testcase where we were comparing
string values like integers.
Signed-off-by: Sudhir Kumar <skumar@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@161
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Fri, 15 Aug 2008 05:10:28 +0000 (05:10 +0000)]
libcgroup: Some cgexec cleanups
From: Vivek Goyal <vgoyal@redhat.com>
cgexec cleanup based on balbir's feedback.
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@160
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Fri, 15 Aug 2008 05:06:14 +0000 (05:06 +0000)]
libcgroup: Some libcgroup API cleanups
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
Dhaval Giani [Fri, 15 Aug 2008 05:02:35 +0000 (05:02 +0000)]
libcgroup: Add up missing scripts/samples
From: Balbir Singh <balbir@linux.vnet.ibm.com>
Dhaval missed a few files while adding files to the
reporsitory. Adding them in now.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@158
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Thu, 14 Aug 2008 18:57:46 +0000 (18:57 +0000)]
libcgroup: Move trunk to v0.3
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@156
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Thu, 14 Aug 2008 18:22:33 +0000 (18:22 +0000)]
libcgroup: Fix up Makefile.in so that we don't lose tests
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@155
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Thu, 14 Aug 2008 18:20:07 +0000 (18:20 +0000)]
libcgroup: Fix cgroup_fill_cgc()
We were failing on stat's success. Stupid thing to do really. Fixing
that now.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@154
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Thu, 14 Aug 2008 18:13:22 +0000 (18:13 +0000)]
libcgroup: Fix return values in cgroup_attach_value
cgroup_attach_task_pid() should return ECGROUPNOTEXIST when we get an
ENOENT from glibc. This patch makes that correction
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@153
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Thu, 14 Aug 2008 15:05:48 +0000 (15:05 +0000)]
Fix configuration assert when multiple controllers are enabled
Since we support multiple controllers, asserting is no longer a good
idea.
TODO: Support other controllers, memory, cpu and cpuacct (possibly
cpusets as well). Well, this code is obsolete and will be replaced
by the newer cgroup API.
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@152
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Thu, 14 Aug 2008 14:51:47 +0000 (14:51 +0000)]
libcgroup: beautify strcpy in modify_cgroup
The code looked ugly. De-uglyfy it.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@151
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Thu, 14 Aug 2008 14:29:29 +0000 (14:29 +0000)]
libcgroup: Fix up some free errors
Sudhir reported a free() issue, it got traced to this issue.
https://sourceforge.net/tracker/index.php?func=detail&aid=
2049822 &group_id=218421&atid=
1043649
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Cc: Sudhir Kumar <skumar@linux.vnet.ibm.com>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@150
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Thu, 14 Aug 2008 11:31:38 +0000 (11:31 +0000)]
libcgroup: Add a mktarball-trunk script
This script allows a tarball of the current trunk to be
generated.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@147
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Thu, 14 Aug 2008 11:16:57 +0000 (11:16 +0000)]
libcgroup: Fix cgroup_modify_cgroup
An almost unused and less tested API. The path was getting
misformed. This was because it had not been set in the first place.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@146
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Thu, 14 Aug 2008 11:10:23 +0000 (11:10 +0000)]
libcgroup: Fix the delete API
The delete call was returning a wrong value even on success.
The reason was because in the fallback path, we try to delete
all the groups again. Now it is possible that a group might
have already been deleted and we return a wrong value.
Change the API to check if the group exists before trying to rmdir
it in the error path.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@145
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Thu, 14 Aug 2008 05:03:36 +0000 (05:03 +0000)]
libcgroup: Ensure null is returned if cgroup does not exist in cgroup_get_cgroup()
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@143
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Thu, 14 Aug 2008 05:01:33 +0000 (05:01 +0000)]
libcgroup: zero out allocated memory
Use calloc to allocate memory.
Should get rid of a number of silent memory corruptions.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Acked-by: Dan Smith <danms@us.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@142
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Thu, 14 Aug 2008 04:50:05 +0000 (04:50 +0000)]
libcgroup: Sample configuration files
From: Balbir Singh <balbir@linux.vnet.ibm.com>
Dhaval forgot to add these files while merging the code.
Merging them in now.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@140
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Thu, 14 Aug 2008 04:44:12 +0000 (04:44 +0000)]
libcgroup: Change compiler to GCC
For some reason these changes got lost. Making the change again.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@139
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Wed, 13 Aug 2008 20:04:51 +0000 (20:04 +0000)]
cgclassify: A command line tool to classify/re-classify already running task
From: Vivek Goyal <vgoyal@redhat.com>
o cgclassify, a command line tool to put a list of pids to the right cgroup
based on rules in /etc/cgrules.conf. It can be mainly used for
reclassification of tasks which are already running. Can think of two
use cases.
- During initial bootup, after cgroups are mounted, one needs to
move tasks (started beofore cgroups were mounted) into right
cgroup.
- Once can choose to reclassify the tasks if admin has changed the
rules and thinks a group of tasks should reclassified based on
new rules.
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@138
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Wed, 13 Aug 2008 20:01:16 +0000 (20:01 +0000)]
cgexec: A command line tool to execute a task in a cgroup
From: Vivek Goyal <vgoyal@redhat.com>
o cgexec, a command line tool for placing the task in right cgroup
in advance so that no help is needed from rules daemon and user can
avoid delay in execution of rules.
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@137
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Wed, 13 Aug 2008 19:58:05 +0000 (19:58 +0000)]
libcgroup: New API interfaces for task placement
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 Giani [Wed, 13 Aug 2008 19:53:35 +0000 (19:53 +0000)]
libcgroup: documentation
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@135
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Wed, 13 Aug 2008 19:35:01 +0000 (19:35 +0000)]
libcgroup: Configuration and parsing updates (v2)
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
Dhaval Giani [Wed, 13 Aug 2008 13:33:59 +0000 (13:33 +0000)]
libcgroup: check for return code of fprintf()
From: Vivek Goyal <vgoyal@redhat.com>
o Adding a task to a particular cgroup currently does fprintf() and never
check the return code. Modify it to check for the return code in case
fprintf() and fflush() did not succeed.
o I ran into the issues when i can't add migration thread to
/container/admingroup/tasks and it will fail silently.
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@133
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Wed, 13 Aug 2008 10:02:33 +0000 (10:02 +0000)]
libcgroup: Fix test cases to use new APIs.
The APIs changed and we could no longer smoke test the library.
Updating it now.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Cc: Sudhir Kumar <skumar@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@132
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Tue, 12 Aug 2008 12:22:45 +0000 (12:22 +0000)]
libcgroup: update version details in trunk and tags
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@131
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Tue, 12 Aug 2008 08:24:18 +0000 (08:24 +0000)]
libcgroup: Change compiler to gcc in Makefile.in
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@128
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Tue, 12 Aug 2008 08:21:08 +0000 (08:21 +0000)]
libcgroup: Extend cgroup_get_cgroup for uids as well.
Now that a new API is available which allows a cgroup structure to
be generated with just a name, extend cgroup_get_cgroup to get the
uids and gids from the fs itself.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@127
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Tue, 12 Aug 2008 08:19:24 +0000 (08:19 +0000)]
libcgroup: Add cgroup_?et_value_* APIs
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
Dhaval Giani [Tue, 12 Aug 2008 08:16:43 +0000 (08:16 +0000)]
libcgroup: Add API to get the cgroup from name (Breaks existing API)
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
Dhaval Giani [Tue, 12 Aug 2008 08:13:02 +0000 (08:13 +0000)]
libcgroup: Add an API to allow comparision of cgroups
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
Dhaval Giani [Sat, 9 Aug 2008 09:27:30 +0000 (09:27 +0000)]
libcgroup: Fix the wrapper warnings
Fixes the following warnings
wrapper.c: In function ‘cgroup_add_value_int64’:
wrapper.c:152: warning: format ‘%lld’ expects type ‘long long int’, but argument 4 has type ‘int64_t’
wrapper.c:152: warning: format ‘%lld’ expects type ‘long long int’, but argument 4 has type ‘int64_t’
wrapper.c: In function ‘cgroup_add_value_uint64’:
wrapper.c:186: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 4 has type ‘u_int64_t’
wrapper.c:186: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 4 has type ‘u_int64_t’
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@122
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Sat, 9 Aug 2008 09:25:22 +0000 (09:25 +0000)]
libcgroup: Fix index values in cgroup_add_value_*
There is a horrible bug in wrapper.c. The loop was causing a segmentation
fault. This is because we were checking for index value as opposed to
i.
This bug was not hit before, because in all our testing, we were
trying out only with CONFIG_FAIR_GROUP_SCHED and we were setting only one
value inside the memory subsystem.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@121
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Sat, 9 Aug 2008 09:23:56 +0000 (09:23 +0000)]
libcgroup: Fix segmentation fault in cgroup_init() -take2
An artifact from the time when libcgroup could not handle multiple
cgroup filesystems mounted at multiple points. It is very much possible
a subsystem is not mounted at that point. (FWIW, it is wrong even on a
single mount point, but I am quite surprised that no one hit it yet.)
V1->V2
A minor cleanup possible.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@120
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Sat, 9 Aug 2008 09:21:57 +0000 (09:21 +0000)]
libcgroup: compile library using GCC
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@119
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Wed, 6 Aug 2008 17:47:41 +0000 (17:47 +0000)]
libcgroup: Add new API to get cgroup data structure from filesystem
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
Dhaval Giani [Tue, 29 Jul 2008 06:44:15 +0000 (06:44 +0000)]
libcgroup: Introduce new error code ECGOTHER
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
Dhaval Giani [Tue, 29 Jul 2008 06:42:13 +0000 (06:42 +0000)]
libcgroup: Add more debug statements
From: Vivek Goyal <vgoyal@redhat.com>
o Add some more debug statements
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@115
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Wed, 23 Jul 2008 06:11:38 +0000 (06:11 +0000)]
libcgroup: Fix up rentrant functions patch.
Some errors were not handled, this patch handles those errors.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@114
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Mon, 21 Jul 2008 13:00:48 +0000 (13:00 +0000)]
libcgroup: Ensure global data is protected
Add rwlock to ensure access to cg_mount_table is serialized.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@110
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Mon, 21 Jul 2008 12:54:45 +0000 (12:54 +0000)]
libcgroup: Make libcgroup use rentrant functions
This patch converts functions which have reentrant versions to
use those versions.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Paul Menage <menage@google.com>
Cc: Dan Smith <danms@us.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@109
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Mon, 21 Jul 2008 12:48:00 +0000 (12:48 +0000)]
libcgroup: fix return value in cg_set_conrol_value
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
Dhaval Giani [Tue, 8 Jul 2008 17:25:32 +0000 (17:25 +0000)]
libcgroup: Fix segmentation fault in cgroup_attach_task_pid
From: Sudhir Kumar <skumar@linux.vnet.ibm.com>
This patch fixes the segmentation fault in libcg api cgroup_attach_task()
in case of multiple mounts.
Signed-off-by: Sudhir Kumar <skumar@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@103
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Tue, 8 Jul 2008 17:11:53 +0000 (17:11 +0000)]
libcgroup: Handle null cgroups in APIs
From: Sudhir Kumar <skumar@linux.vnet.ibm.com>
[dhaval@linux.vnet.ibm.com]: correct error codes
Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@102
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Fri, 4 Jul 2008 18:47:59 +0000 (18:47 +0000)]
libcgroup: fix wrong malloc size in testcase
From: Sudhir Kumar <skumar@linux.vnet.ibm.com>
This patch fixes a small mistake in the previous patch for malloc size.
Of course the size should not be of the pointer but the structure.
Signed-off-by: Sudhir Kumar <skumar@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@98
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Wed, 2 Jul 2008 09:08:37 +0000 (09:08 +0000)]
libcgroup: Fix test cases to use CPU controller if available
The test cases used the memory controller. This is not a good idea
since most distro kernels don't enable it by default. For the moment
I'm setting it to use CPU if memory is not found, but in the longer
term I am planning to set it to use CPU first and then memory.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Acked-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@97
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Tue, 1 Jul 2008 14:12:07 +0000 (14:12 +0000)]
libcgroup: Fix invalid pid test case.
0 is a valid PID for cgroup filesystem. It moves the current
task into the cgroup. Let's try -1 instead.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@96
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Tue, 1 Jul 2008 14:09:44 +0000 (14:09 +0000)]
From: Sudhir Kumar <skumar@linux.vnet.ibm.com>
libcgroup: adds sanity check in libcgroup testcases binary
This patch adds a sanity check on cgroup file system info in testcases.
If cgroup filesystem is not mounted and script sends the info as mounted,
then the binar would have failed. This patch handles that.
Signed-off-by: Sudhir Kumar <skumar@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@95
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Tue, 1 Jul 2008 14:07:07 +0000 (14:07 +0000)]
From: Sudhir Kumar <skumar@linux.vnet.ibm.com>
libcgroup: testcases for cgroup_modify_cgroup()
This patch adds testcases for libcgroup API cgroup_modify_cgroup() testing. The API
is called with filesystem mounted (FS_MOUNTED=1) and return values are checked.
The API is first called with the same cgroup(the one which is existing in the
file system, and with all the same parameters). The second time it is called
with a null cgroup. Third time it is called with a new cgroup having different
controller.
The filesystem is checked if the values have been modified.
Signed-off-by: Sudhir Kumar <skumar@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@94
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Tue, 1 Jul 2008 14:05:09 +0000 (14:05 +0000)]
From: Sudhir Kumar <skumar@linux.vnet.ibm.com>
libcgroup: put common code in a function
This patch puts the common code for creating cgroup structure into
a function struct cgroup *new_cgroup(). The function uses few global
variables which are changed before the function call and takes few
variables as arguments.
Signed-off-by: Sudhir Kumar <skumar@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@93
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Tue, 1 Jul 2008 14:00:25 +0000 (14:00 +0000)]
From: Sudhir Kumar <skumar@linux.vnet.ibm.com>
libcgroup: testcases for wrapper api and cgroup_modify_cgroup()
This patch creates a valid cgroup structure to be passed as the parameter
for cgroup_modify_cgroup() function and calls this function. The return
values are checked and on that basis the test is declared as pass or fail.
The patch adds the code that check if the parameter changed reflect in
the filesystem.
Signed-off-by: Sudhir Kumar <skumar@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@92
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Tue, 1 Jul 2008 13:54:34 +0000 (13:54 +0000)]
From: Sudhir Kumar <skumar@linux.vnet.ibm.com>
libcgroup: further testcases for create_cgroup() and delete_cgroup()
This patch adds testcases for libcgroup API cgroup_create_cgroup() and
cgroup_delete_cgroup() testing. The APIs are called under the same but two
conditions(FS_MOUNTED=0/1) and return values are checked. The test checks if
these APIs can handle a null cgroup and hence passes a nulll cgroup as
parameter.
Signed-off-by: Sudhir Kumar <skumar@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@91
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Tue, 1 Jul 2008 13:51:52 +0000 (13:51 +0000)]
From: Sudhir Kumar <skumar@linux.vnet.ibm.com>
libcgroup: libcgroup testcases for cgroup_attach_task()
This patch adds testcases for libcgroup API cgroup_create_cgroup() and
cgroup_delete_cgroup() testing. The APIs are called under the same but two
conditions(FS_MOUNTED=0/1) and return values are checked. The cgroup is
created and freed using the wrapper APIs.
Testcases for FS_MOUNTED=2 have to be added.
Signed-off-by: Sudhir Kumar <skumar@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@90
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Tue, 1 Jul 2008 13:48:58 +0000 (13:48 +0000)]
From: Sudhir Kumar <skumar@linux.vnet.ibm.com>
libcgroup: libcgroup testcases for cgroup_attach_task()
This patch adds 3 testcases for libcgroup API cgroup_attach_task() testing. The API
is called under the same but two conditions(FS_MOUNTED=0/1) and return
values are checked. For FS_MOUNTED=1 the API is first called without
intializing ie without calling cgroup_init(), and then after cg_init(). Each time
the null cgroup is passed. The task is checked if it exists under the root
group's tasks file.
The 4th testcase calls cgroup_attach_task_pid() with an invalid pid.
Testcases for FS_MOUNTED=2 have to be added.
Signed-off-by: Sudhir Kumar <skumar@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@89
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Tue, 1 Jul 2008 13:45:51 +0000 (13:45 +0000)]
From: Sudhir Kumar <skumar@linux.vnet.ibm.com>
libcgroup: libcgroup testcase for cgroup_init()
This patch adds total 3 testcases for libcgroup API cgroup_init() testing.The
API is called under the same three conditions(FS_MOUNTED=0/1/2) and return
values are checked. Testcases for FS_MOUNTED=2 have to be updated and added.
Signed-off-by: Sudhir Kumar <skumar@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@88
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Tue, 1 Jul 2008 13:43:16 +0000 (13:43 +0000)]
From: Sudhir Kumar <skumar@linux.vnet.ibm.com>
libcgroup: framework for libcgroup testcases
This Patch creates the basic infrastructure for libcgroup testcases. This
patch adds a script which runs the binary(C) file. The script does all the
environment setup to run the tests and passes this info to the C file through
command line arguments. The binary runs the test cases calling the API's
in different environment conditions. The Makefile compiles the test. The top
level Makefile.in is edited to support
make test
make testclean
The script runs this binary total 3 times, each time with diff varaible.
FS_MOUNTED=0 # cgroup fs not mounted
FS_MOUNTED=1 # cgroup fs mounted
FS_MOUNTED=2 # cgroup fs mounted at multiple points
Signed-off-by: Sudhir Kumar <skumar@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@87
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Tue, 1 Jul 2008 13:34:21 +0000 (13:34 +0000)]
Missed some files while trying to commit the test cases to trunk.
Reverting that change, and trying again.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@86
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Tue, 1 Jul 2008 12:11:37 +0000 (12:11 +0000)]
From: Sudhir Kumar <skumar@linux.vnet.ibm.com>
libcgroup: framework for libcgroup testcases
This Patch creates the basic infrastructure for libcgroup testcases. This
patch adds a script which runs the binary(C) file. The script does all the
environment setup to run the tests and passes this info to the C file through
command line arguments. The binary runs the test cases calling the API's
in different environment conditions. The Makefile compiles the test. The top
level Makefile.in is edited to support
make test
make testclean
The script runs this binary total 3 times, each time with diff varaible.
FS_MOUNTED=0 # cgroup fs not mounted
FS_MOUNTED=1 # cgroup fs mounted
FS_MOUNTED=2 # cgroup fs mounted at multiple points
Signed-off-by: Sudhir Kumar <skumar@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@85
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Tue, 1 Jul 2008 08:20:21 +0000 (08:20 +0000)]
From: Sudhir Kumar <sudhir@linux.vnet.ibm.com>
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
Dhaval Giani [Mon, 16 Jun 2008 18:11:37 +0000 (18:11 +0000)]
libcg: Add a new trunk
Setting trunk to v0.1c. This is the branch against which
all development should take place.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@79
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Wed, 11 Jun 2008 08:20:54 +0000 (08:20 +0000)]
libcgroup: Fix segmentation fault in APIs.
Dan Smith reported some segmentation faults. It turns out that we did
not NULL terminate all the structures when we had moved to the wrapper
based approach. With this in mind, the loop checks the index instead
of a NULL structure.
Also remove unwanted NULL terminations.
Thanks to Dan for excellent debugging.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/tags/v0.1c@77
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Tue, 10 Jun 2008 19:17:26 +0000 (19:17 +0000)]
Some bugs were missed in v0.1b. Fixing those bugs and tagging
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
Balbir Singh [Tue, 3 Jun 2008 03:14:56 +0000 (03:14 +0000)]
Removed extra "," in changelog
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/tags/v0.1b@75
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Tue, 3 Jun 2008 03:08:19 +0000 (03:08 +0000)]
Bumped up release in spec file to 3. Added post and postun to spec file.
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/tags/v0.1b@74
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Fri, 30 May 2008 21:10:23 +0000 (21:10 +0000)]
Rename %makeinstall in changelog to makeinstall
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/tags/v0.1b@70
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Fri, 30 May 2008 21:07:22 +0000 (21:07 +0000)]
Fixed Source0 and URL as per Tom's comments
Also updated changelog
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/tags/v0.1b@69
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Fri, 30 May 2008 18:01:00 +0000 (18:01 +0000)]
Fix more api.c warnings
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/tags/v0.1b@68
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Fri, 30 May 2008 17:50:23 +0000 (17:50 +0000)]
Fix api.c warnings, include wrapper.c in Makefile. More changes to
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
Balbir Singh [Thu, 29 May 2008 19:01:40 +0000 (19:01 +0000)]
Update URL to reflect the correct source location
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/tags/v0.1b@65
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Thu, 29 May 2008 18:57:47 +0000 (18:57 +0000)]
Remove extra %description from spec file
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/tags/v0.1b@64
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Thu, 29 May 2008 18:23:07 +0000 (18:23 +0000)]
Fix summary-to-long in libcgroup.spec.in
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/tags/v0.1b@63
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Thu, 29 May 2008 18:15:56 +0000 (18:15 +0000)]
Change the name from cgroup -> libcgroup
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/tags/v0.1b@62
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Dhaval Giani [Tue, 27 May 2008 07:44:06 +0000 (07:44 +0000)]
libcgroup: Correct changelog in spec file
The changelog was backwards in the specfile, correcting that.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/tags/v0.1b@60
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Mon, 26 May 2008 11:01:58 +0000 (11:01 +0000)]
Removed AC_PROG_MKDIR_P from configure.in, it was preventing us
from getting to work without install-sh. Regenrate configure after the changes
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/tags/v0.1b@58
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Mon, 26 May 2008 11:00:23 +0000 (11:00 +0000)]
Removed AC_PROG_MKDIR_P from configure.in, it was preventing us
from getting to work without install-sh
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/tags/v0.1b@57
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Sat, 24 May 2008 15:24:00 +0000 (15:24 +0000)]
Moving away from the install-sh model and removed AC_PROG_INSTALL
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/tags/v0.1b@54
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Sat, 24 May 2008 11:23:08 +0000 (11:23 +0000)]
Merged with balbir, all part of build automation
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/tags/v0.1b@52
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Sat, 24 May 2008 11:16:09 +0000 (11:16 +0000)]
Create a new tag v0.1b
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/tags/v0.1b@50
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Sat, 24 May 2008 11:08:57 +0000 (11:08 +0000)]
Add v0.1b tag
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/tags/v0.1b@49
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Sat, 17 May 2008 16:06:20 +0000 (16:06 +0000)]
Multiple mount point support. Patches built on top of Dhaval'a patches.
Works for me on my testing. NOTE: The testing is insufficient as we
only test cg_control_create_cgroup() and not delete_cgroup() or
attach_task(). Sudhir's new test cases should really help
Several coding style fixes and changes, enhancements to make the code
work.
NOTE: Since this is development release -DDEBUG is back in the makefile.
Once this is committed, I'll bump up the version to 0.05 if no one objects.
Test report
-----------
debug log from the library
matched cpuacct:cpuacct
Found cgroup option rw,relatime,cpuacct, count 0
matched cpu:cpu
Found cgroup option rw,relatime,cpu, count 1
tuid 0, tgid 0, cuid 1000, cgid 1000
path is /tmp/container_cpu/database/
path is /tmp/container_cpuacct/database/
NOTE: The database directory was created as expected on both mount points
/tmp/container_cpu and /tmp/container_cpuacct
balbir@localhost:~/deliverables/nextgen/libcg/branches/balbir/tests$ ls -al /tmp/container_cpuacct/
total 424
drwxrwxrwt 5 root root 0 2008-05-17 21:27 .
drwxrwxrwt 32 root root 425984 2008-05-17 21:26 ..
drwxr-xr-x 2 root root 0 2008-05-17 17:09 class1
drwxr-xr-x 2 balbir balbir 0 2008-05-17 17:09 class2
-rw-r--r-- 1 root root 0 2008-05-17 17:09 cpuacct.usage
drwxr-xr-x 2 balbir balbir 0 2008-05-17 21:27 database
-rw-r--r-- 1 root root 0 2008-05-17 17:09 notify_on_release
-rw-r--r-- 1 root root 0 2008-05-17 17:09 releasable
-rw-r--r-- 1 root root 0 2008-05-17 17:09 release_agent
-rwxrwxrwx 1 root root 0 2008-05-17 17:09 tasks
balbir@localhost:~/deliverables/nextgen/libcg/branches/balbir/tests$ ls -al /tmp/container_cpu
total 424
drwxrwxrwt 5 root root 0 2008-05-17 21:27 .
drwxrwxrwt 32 root root 425984 2008-05-17 21:26 ..
drwxr-xr-x 2 root root 0 2008-05-17 17:09 class1
drwxr-xr-x 2 balbir balbir 0 2008-05-17 17:09 class2
-rw-r--r-- 1 root root 0 2008-05-17 17:09 cpu.rt_runtime_us
-rw-r--r-- 1 root root 0 2008-05-17 17:09 cpu.shares
drwxr-xr-x 2 balbir balbir 0 2008-05-17 21:27 database
-rw-r--r-- 1 root root 0 2008-05-17 17:09 notify_on_release
-rw-r--r-- 1 root root 0 2008-05-17 17:09 releasable
-rw-r--r-- 1 root root 0 2008-05-17 17:09 release_agent
-rwxrwxrwx 1 root root 0 2008-05-17 21:10 tasks
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/branches/balbir@30
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Sat, 17 May 2008 11:38:53 +0000 (11:38 +0000)]
Implement multiple mount point support
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@29
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Sun, 11 May 2008 11:25:38 +0000 (11:25 +0000)]
Remove merge comments and left overs from previous merge
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@27
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Sun, 11 May 2008 10:27:04 +0000 (10:27 +0000)]
Merge with Dhaval's branch
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@26
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Sun, 11 May 2008 10:15:14 +0000 (10:15 +0000)]
Merge from Balbir's and Dhaval's branches
Makefile | 13 ++
api.c | 335 ++++++++++++++++++++++++++++++++++++++++-----------------------
libcg.h | 42 +++++--
3 files changed, 255 insertions(+), 135 deletions(-)
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@24
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Mon, 21 Apr 2008 10:46:09 +0000 (10:46 +0000)]
chown recursive routines need to return zero on success
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@19
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Fri, 18 Apr 2008 05:34:12 +0000 (05:34 +0000)]
Miscellaneous scripts and libcg bug fixes
Turn off -DDEBUG in Makefile
Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@18
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Wed, 16 Apr 2008 11:59:32 +0000 (11:59 +0000)]
use getgrnam() for groups
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@17
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Wed, 16 Apr 2008 11:29:24 +0000 (11:29 +0000)]
Fixed an initscripts problem. Comments were not ignored in the second
level configuration file (i.e. cpu.conf)
wlm | 65 ++++++++++++++++++++++++++++++++++-------------------------------
1 file changed, 34 insertions(+), 31 deletions(-)
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@16
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Wed, 16 Apr 2008 10:53:55 +0000 (10:53 +0000)]
api.c | 23 +++++++++++++++--------
libcg.h | 4 ++--
tests/libcg_ba.cpp | 2 +-
Added additional parameters for create and destroy cgroup. Fixed a cg_init
segfault (faulty, if-else check)
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@15
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Mon, 14 Apr 2008 21:11:40 +0000 (21:11 +0000)]
Add init scripts and a README. NOTE: These init scripts will change
frequently and drastically.
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@14
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Sat, 12 Apr 2008 05:17:30 +0000 (05:17 +0000)]
Got recursive chown to work. API needs more changes to be able to ignore
ownership arguments.
api.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@13
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Fri, 11 Apr 2008 19:38:06 +0000 (19:38 +0000)]
Several bug fixes, some API enhancements.
The first basic acceptance test is under development and first
prototype is released
api.c | 161 +++++++++++++++++++++++++++++++++++++++++++----------
libcg.h | 14 +---
tests/Makefile | 9 ++
tests/libcg_ba.cpp | 127 +++++++++++++++++++++++++++++++++++++++++
4 files changed, 274 insertions(+), 37 deletions(-)
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@12
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Thu, 10 Apr 2008 12:13:23 +0000 (12:13 +0000)]
Removed balbir
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@11
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Thu, 10 Apr 2008 12:12:19 +0000 (12:12 +0000)]
Commit to trunk (still untested)
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@10
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Thu, 10 Apr 2008 11:56:33 +0000 (11:56 +0000)]
Miscellaneous changes, some coding style fixes and refactoring of code.
Also added a install/uninstall target
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@9
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Thu, 10 Apr 2008 11:37:35 +0000 (11:37 +0000)]
This patch fixes file handle leaks as noticed by Paul Menage.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@8
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Mon, 7 Apr 2008 13:27:39 +0000 (13:27 +0000)]
This patch modifies libcg to use the new cgroup data structure.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
The code is yet to be tested though
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@7
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Mon, 7 Apr 2008 13:23:26 +0000 (13:23 +0000)]
Create balbir's branch
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@6
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Mon, 7 Apr 2008 13:23:26 +0000 (13:23 +0000)]
Create balbir's branch
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/branches/balbir@6
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53
Balbir Singh [Sat, 5 Apr 2008 13:33:32 +0000 (13:33 +0000)]
Dhaval's API changes, phase 1, prototype
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@4
4f4bb910 -9a46-0410-90c8-
c897d4f1cd53