<feed xmlns='http://www.w3.org/2005/Atom'>
<title>libcg.git/include, branch devel/cgdelete</title>
<subtitle>Unnamed repository; edit this file to name it for gitweb.</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/'/>
<entry>
<title>Add recursive cgroup_delete_cgroup_ext.</title>
<updated>2009-07-29T13:17:47+00:00</updated>
<author>
<name>Jan Safranek</name>
<email>jsafrane@redhat.com</email>
</author>
<published>2009-07-29T13:17:47+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=67f6b94acfb1fceda2cc77aa37901293c5022df8'/>
<id>67f6b94acfb1fceda2cc77aa37901293c5022df8</id>
<content type='text'>
The new function allows to recursively delete whole tree of groups. There is
new infrastructure created around (cg_delete_cgroup_controller_recursive).

It has inconsistent behavior when root group removal is requested - it removes
all children (if requested), but does not remove the root itself and returns
success value. This allows simple rewrite of cgclear functions to use this
function.

Original cgroup_delete_cgroup now leads to cgroup_delete_cgroup_ext.

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The new function allows to recursively delete whole tree of groups. There is
new infrastructure created around (cg_delete_cgroup_controller_recursive).

It has inconsistent behavior when root group removal is requested - it removes
all children (if requested), but does not remove the root itself and returns
success value. This allows simple rewrite of cgclear functions to use this
function.

Original cgroup_delete_cgroup now leads to cgroup_delete_cgroup_ext.

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Export cgroup_find_parent and add testing code for it</title>
<updated>2009-07-28T14:08:39+00:00</updated>
<author>
<name>Jan Safranek</name>
<email>jsafrane@redhat.com</email>
</author>
<published>2009-07-28T14:08:39+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=9b269475dbc9d9a7527c7ff512bf2a5a0aa493a4'/>
<id>9b269475dbc9d9a7527c7ff512bf2a5a0aa493a4</id>
<content type='text'>
This patch does not necessarily need to be accepted, it just provides testing
facility for new cgroup_find_parent.

Especially note the ugly dependence on ../src/tools/tools-common.c :)

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch does not necessarily need to be accepted, it just provides testing
facility for new cgroup_find_parent.

Especially note the ugly dependence on ../src/tools/tools-common.c :)

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Configure the location of cgrulesengd socket</title>
<updated>2009-07-01T15:04:50+00:00</updated>
<author>
<name>Jan Safranek</name>
<email>jsafrane@redhat.com</email>
</author>
<published>2009-06-30T12:29:19+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=a9816059ccbf1d49e86998fb495204d2d7a47309'/>
<id>a9816059ccbf1d49e86998fb495204d2d7a47309</id>
<content type='text'>
This patch allows users to configure location of cgrulesengd socket before
compilation:

./configure --enable-cgred-socket=/var/run/cgred.socket

In addition, /var/run/cgred.socket is now default location of the socket - this
sounds LSB compliant to me. Feel free to suggest better one.

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch allows users to configure location of cgrulesengd socket before
compilation:

./configure --enable-cgred-socket=/var/run/cgred.socket

In addition, /var/run/cgred.socket is now default location of the socket - this
sounds LSB compliant to me. Feel free to suggest better one.

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Cleanup: find better name for CGRULE_CGRED_TEMP_FILE</title>
<updated>2009-07-01T15:04:49+00:00</updated>
<author>
<name>Jan Safranek</name>
<email>jsafrane@redhat.com</email>
</author>
<published>2009-06-30T12:29:12+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=94a0ad95bc19f181beadef7cf7c4dade556eba7f'/>
<id>94a0ad95bc19f181beadef7cf7c4dade556eba7f</id>
<content type='text'>
Rename CGRULE_CGRED_TEMP_FILE to CGRULE_CGRED_SOCKET_PATH to better describe
the macro usage - it's not a temporary file, it's a socket.

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename CGRULE_CGRED_TEMP_FILE to CGRULE_CGRED_SOCKET_PATH to better describe
the macro usage - it's not a temporary file, it's a socket.

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add the library function cgroup_register_unchanged_process().</title>
<updated>2009-06-29T11:21:10+00:00</updated>
<author>
<name>Ken'ichi Ohmichi</name>
<email>oomichi@mxs.nes.nec.co.jp</email>
</author>
<published>2009-06-26T05:51:06+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=1c29610af69bf3bb0e088ed3eca770589849b0da'/>
<id>1c29610af69bf3bb0e088ed3eca770589849b0da</id>
<content type='text'>
Hi,

Changelog of v6:
================
 * No change.

Changelog of v5:
================
 * Rebase the patch to the latest code.

Changelog of v4:
================
 * No change.

Changelog of v3:
================
 * No change.

Changelog of v2:
================
 * New patch.

Description:
============
This patch adds the library function cgroup_register_unchanged_process()
for notifying cgrulesengd daemon of the unchanged process.

Thanks
Ken'ichi Ohmichi

Signed-off-by: Ken'ichi Ohmichi &lt;oomichi@mxs.nes.nec.co.jp&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Hi,

Changelog of v6:
================
 * No change.

Changelog of v5:
================
 * Rebase the patch to the latest code.

Changelog of v4:
================
 * No change.

Changelog of v3:
================
 * No change.

Changelog of v2:
================
 * New patch.

Description:
============
This patch adds the library function cgroup_register_unchanged_process()
for notifying cgrulesengd daemon of the unchanged process.

Thanks
Ken'ichi Ohmichi

Signed-off-by: Ken'ichi Ohmichi &lt;oomichi@mxs.nes.nec.co.jp&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add the handler of unchanged process to cgrulesengd daemon.</title>
<updated>2009-06-29T11:17:32+00:00</updated>
<author>
<name>Ken'ichi Ohmichi</name>
<email>oomichi@mxs.nes.nec.co.jp</email>
</author>
<published>2009-06-26T05:50:54+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=afbbee67863b4debf4ec849ff3d6a3f1f21b73ef'/>
<id>afbbee67863b4debf4ec849ff3d6a3f1f21b73ef</id>
<content type='text'>
Hi,

Changelog of v6:
================
 * No change.

Changelog of v5:
================
 * No change.

Changelog of v4:
================
 * Add the comment "FIXME: Change the temporary file to configurable one."
 * Define the number of allocation.

Changelog of v3:
================
 * Set the value 0x1 to CGROUP_DAEMON_UNCHANGE_CHILDREN flag.

Changelog of v2:
================
 * New patch.

Description:
============
This patch adds the handler of unchanged process to the cgrulesengd daemon.
By this patch, the daemon does not change a process which is executed by
'cgexec' command, because it is possible to notify the unchanged process to
the daemon by using "unix domain socket".

Thanks
Ken'ichi Ohmichi

Signed-off-by: Ken'ichi Ohmichi &lt;oomichi@mxs.nes.nec.co.jp&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Hi,

Changelog of v6:
================
 * No change.

Changelog of v5:
================
 * No change.

Changelog of v4:
================
 * Add the comment "FIXME: Change the temporary file to configurable one."
 * Define the number of allocation.

Changelog of v3:
================
 * Set the value 0x1 to CGROUP_DAEMON_UNCHANGE_CHILDREN flag.

Changelog of v2:
================
 * New patch.

Description:
============
This patch adds the handler of unchanged process to the cgrulesengd daemon.
By this patch, the daemon does not change a process which is executed by
'cgexec' command, because it is possible to notify the unchanged process to
the daemon by using "unix domain socket".

Thanks
Ken'ichi Ohmichi

Signed-off-by: Ken'ichi Ohmichi &lt;oomichi@mxs.nes.nec.co.jp&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add the key "process name" to find a matching rule.</title>
<updated>2009-06-29T11:17:32+00:00</updated>
<author>
<name>Ken'ichi Ohmichi</name>
<email>oomichi@mxs.nes.nec.co.jp</email>
</author>
<published>2009-06-26T05:49:50+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=495c45c844522c29ee4d0a26942e894f1346c237'/>
<id>495c45c844522c29ee4d0a26942e894f1346c237</id>
<content type='text'>
Hi,

Changelog of v6:
================
 * No change.

Changelog of v5.1:
==================
 * BUGFIX: Clear the flags meaning "found a matching rule"
   when a process name does not match.

   There was a problem that cgexec and cgclassify didn't work correctly
   if a user executes cgexec/cgclassify based on /etc/cgrules.conf.
   For example, if a root user executes `cgclassify $$` on the following
   /etc/cgrules.conf, the process ($$) should be moved to users/root on
   cpuset and memory subsystems. But the process was moved to users/root/cp
   on memory subsystem only.
     Example of /etc/cgrules.conf:
     =============================
     root:cp          cpuset  users/root/cp
     %                memory  users/root/cp
     root             cpuset  users/root
     %                memory  users/root

   The cause is why the flags meaning "found a matching rule" (uid, gid, and
   matched) is not cleared when a process name does not match. This problem
   is fixed on this patch.

Changelog of v5:
================
 * Rebase the patch to the latest code.

Changelog of v4:
================
 * No change.

Changelog of v3:
================
 * BUGFIX: Fix the handling of '%' in /etc/cgrules.conf.

Changelog of v2:
================
 * Use strcmp() instead of strncmp() for checking a process name strictly.
 * Some cleanups.

Description:
============
This patch adds the key "process name" to find a matching rule.

Thanks
Ken'ichi Ohmichi

Signed-off-by: Ken'ichi Ohmichi &lt;oomichi@mxs.nes.nec.co.jp&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Hi,

Changelog of v6:
================
 * No change.

Changelog of v5.1:
==================
 * BUGFIX: Clear the flags meaning "found a matching rule"
   when a process name does not match.

   There was a problem that cgexec and cgclassify didn't work correctly
   if a user executes cgexec/cgclassify based on /etc/cgrules.conf.
   For example, if a root user executes `cgclassify $$` on the following
   /etc/cgrules.conf, the process ($$) should be moved to users/root on
   cpuset and memory subsystems. But the process was moved to users/root/cp
   on memory subsystem only.
     Example of /etc/cgrules.conf:
     =============================
     root:cp          cpuset  users/root/cp
     %                memory  users/root/cp
     root             cpuset  users/root
     %                memory  users/root

   The cause is why the flags meaning "found a matching rule" (uid, gid, and
   matched) is not cleared when a process name does not match. This problem
   is fixed on this patch.

Changelog of v5:
================
 * Rebase the patch to the latest code.

Changelog of v4:
================
 * No change.

Changelog of v3:
================
 * BUGFIX: Fix the handling of '%' in /etc/cgrules.conf.

Changelog of v2:
================
 * Use strcmp() instead of strncmp() for checking a process name strictly.
 * Some cleanups.

Description:
============
This patch adds the key "process name" to find a matching rule.

Thanks
Ken'ichi Ohmichi

Signed-off-by: Ken'ichi Ohmichi &lt;oomichi@mxs.nes.nec.co.jp&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add the parser of process name in /etc/cgrules.conf.</title>
<updated>2009-06-29T10:58:38+00:00</updated>
<author>
<name>Ken'ichi Ohmichi</name>
<email>oomichi@mxs.nes.nec.co.jp</email>
</author>
<published>2009-06-26T05:49:36+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=d297b6fc17d51b8c2f6cdc094ada378d49e9a583'/>
<id>d297b6fc17d51b8c2f6cdc094ada378d49e9a583</id>
<content type='text'>
Hi,

Changelog of v6:
================
 * The definations of CGROUP_RULE_MAXKEY and CGROUP_RULE_MAXLINE are
   moved to libcgroup-internal.h since no one from outside should be
   using them.

Changelog of v5:
================
 * Rebase the patch to the latest code.

Changelog of v4:
================
 * Use more safety length of a user name for the buffer "username".
 * Move the macros min()/max() to src/libcgroup-internal.h for using
   in src/api.c also.

Changelog of v3:
================
 * Fix unclear buffer of user by memset().

Changelog of v2:
================
 * Remove unnecessary memset().
 * Some cleanups.

Description:
============
This patch adds the parser of process name in /etc/cgrules.conf.

A new rule based on process name is as the following, and the process
name is stored into the member "procname" in struct cgroup_rule.
  &lt;user&gt;:&lt;process name&gt;  &lt;controllers&gt;   &lt;destination&gt;

Thanks
Ken'ichi Ohmichi

Signed-off-by: Ken'ichi Ohmichi &lt;oomichi@mxs.nes.nec.co.jp&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Hi,

Changelog of v6:
================
 * The definations of CGROUP_RULE_MAXKEY and CGROUP_RULE_MAXLINE are
   moved to libcgroup-internal.h since no one from outside should be
   using them.

Changelog of v5:
================
 * Rebase the patch to the latest code.

Changelog of v4:
================
 * Use more safety length of a user name for the buffer "username".
 * Move the macros min()/max() to src/libcgroup-internal.h for using
   in src/api.c also.

Changelog of v3:
================
 * Fix unclear buffer of user by memset().

Changelog of v2:
================
 * Remove unnecessary memset().
 * Some cleanups.

Description:
============
This patch adds the parser of process name in /etc/cgrules.conf.

A new rule based on process name is as the following, and the process
name is stored into the member "procname" in struct cgroup_rule.
  &lt;user&gt;:&lt;process name&gt;  &lt;controllers&gt;   &lt;destination&gt;

Thanks
Ken'ichi Ohmichi

Signed-off-by: Ken'ichi Ohmichi &lt;oomichi@mxs.nes.nec.co.jp&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libcgroup: Introduce an API to get the mount point of a specific subsystem</title>
<updated>2009-06-26T17:36:18+00:00</updated>
<author>
<name>Dhaval Giani</name>
<email>dhaval@linux.vnet.ibm.com</email>
</author>
<published>2009-06-26T17:36:18+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=305fdb705e4eca50f3dc18d7cc685b547ce0ee98'/>
<id>305fdb705e4eca50f3dc18d7cc685b547ce0ee98</id>
<content type='text'>
Introduce an API which will query the mount table and return the mount point
of a specific subsystem. This is needed in the case when the user knows which
subsystem he wants the details of, which would make the use of the get_controller*
APIs cumbersome.

Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce an API which will query the mount table and return the mount point
of a specific subsystem. This is needed in the case when the user knows which
subsystem he wants the details of, which would make the use of the get_controller*
APIs cumbersome.

Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libcgroup: Introduce a unload cgroups API</title>
<updated>2009-06-22T11:50:09+00:00</updated>
<author>
<name>Dhaval Giani</name>
<email>dhaval@linux.vnet.ibm.com</email>
</author>
<published>2009-06-22T11:50:09+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=b761e6e872d2ef159f0d2e6d80c3fe2b6218bf19'/>
<id>b761e6e872d2ef159f0d2e6d80c3fe2b6218bf19</id>
<content type='text'>
This API will unload the cgroups created in the cgroupfs and
unmount and delete the filesystem mount point. The action is
equivalent to what is done currently in service cgconfig stop.

The reason for this API is to make sure we don't end up with a
asymmetric library API subset. Today an application program can
programatically through cgroup_config_load_config() load a
configuration file, but has no means to cleanup (including all
temporarily created groups).

changes from v3
1. Address Jan's comments from http://article.gmane.org/gmane.comp.lib.libcg.devel/1105
changes from v2
1. Fix a leak as noted by Bharata
2. Address Balbir's review comments at
http://article.gmane.org/gmane.comp.lib.libcg.devel/1080
changes from v1
1. Change the name of the function to cgroup_unload_cgroups
2. Change the name of the executatble to cgclear
3. Split out the funtions

Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
Acked-by: Balbir Singh &lt;balbir@linux.vnet.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This API will unload the cgroups created in the cgroupfs and
unmount and delete the filesystem mount point. The action is
equivalent to what is done currently in service cgconfig stop.

The reason for this API is to make sure we don't end up with a
asymmetric library API subset. Today an application program can
programatically through cgroup_config_load_config() load a
configuration file, but has no means to cleanup (including all
temporarily created groups).

changes from v3
1. Address Jan's comments from http://article.gmane.org/gmane.comp.lib.libcg.devel/1105
changes from v2
1. Fix a leak as noted by Bharata
2. Address Balbir's review comments at
http://article.gmane.org/gmane.comp.lib.libcg.devel/1080
changes from v1
1. Change the name of the function to cgroup_unload_cgroups
2. Change the name of the executatble to cgclear
3. Split out the funtions

Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
Acked-by: Balbir Singh &lt;balbir@linux.vnet.ibm.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
