<feed xmlns='http://www.w3.org/2005/Atom'>
<title>libcg.git, 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>Refactor cgclear to use new recursive delete</title>
<updated>2009-07-29T13:21:39+00:00</updated>
<author>
<name>Jan Safranek</name>
<email>jsafrane@redhat.com</email>
</author>
<published>2009-07-29T13:21:39+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=8310715a321c0ec1653debc9fd28a622bb559789'/>
<id>8310715a321c0ec1653debc9fd28a622bb559789</id>
<content type='text'>
Let's rework cgroup_config_unload_controller to use the brand new recursive
removal of groups. It saves *lot of* fopen() and fclose() calls.

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Let's rework cgroup_config_unload_controller to use the brand new recursive
removal of groups. It saves *lot of* fopen() and fclose() calls.

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add cgdelete tool</title>
<updated>2009-07-29T13:21:39+00:00</updated>
<author>
<name>Jan Safranek</name>
<email>jsafrane@redhat.com</email>
</author>
<published>2009-07-29T13:21:39+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=0c93bc814e1ea8c6b962406ad1163c6b44ca2daf'/>
<id>0c93bc814e1ea8c6b962406ad1163c6b44ca2daf</id>
<content type='text'>
The cgdelete command line tool removes given control groups.

Usage: cgdelete [-r]  &lt;controllers&gt;:&lt;group&gt; [...]

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The cgdelete command line tool removes given control groups.

Usage: cgdelete [-r]  &lt;controllers&gt;:&lt;group&gt; [...]

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<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>Split cgroup removal to separate functions.</title>
<updated>2009-07-29T13:14:24+00:00</updated>
<author>
<name>Jan Safranek</name>
<email>jsafrane@redhat.com</email>
</author>
<published>2009-07-29T13:14:24+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=c2cb41865e7691a615485abcb21e19536bd13148'/>
<id>c2cb41865e7691a615485abcb21e19536bd13148</id>
<content type='text'>
cgroup_delete_cgroup does all the stuff on it's own. This patch refactors
the function and moves the parts with complete error handling.

The new functions are cg_delete_cgroup_controller and cg_move_task_files.
They are not necessarily needed, but it simplifies error handling and clearly
distinguishes functionality of cgroup_delete_cgroup.

Purpose of the functions should be clearly specified in the doxygen comments.

Especially note that cg_delete_cgroup_controller wants already opened file,
where all tasks should be moved - this is optimization, which will be used in
subsequent patches. I could use cgroup_get_task_* and cgroup_attach_task, which
would look definitely nicer, but it would lead to lot of fopen() and fclose()
calls. Let me know what do you think about it.

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
cgroup_delete_cgroup does all the stuff on it's own. This patch refactors
the function and moves the parts with complete error handling.

The new functions are cg_delete_cgroup_controller and cg_move_task_files.
They are not necessarily needed, but it simplifies error handling and clearly
distinguishes functionality of cgroup_delete_cgroup.

Purpose of the functions should be clearly specified in the doxygen comments.

Especially note that cg_delete_cgroup_controller wants already opened file,
where all tasks should be moved - this is optimization, which will be used in
subsequent patches. I could use cgroup_get_task_* and cgroup_attach_task, which
would look definitely nicer, but it would lead to lot of fopen() and fclose()
calls. Let me know what do you think about it.

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>RFC: Fix cgroup_find_parent function</title>
<updated>2009-07-28T14:08:36+00:00</updated>
<author>
<name>Jan Safranek</name>
<email>jsafrane@redhat.com</email>
</author>
<published>2009-07-28T14:08:36+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=4b198940a8d38da33581ea2eef7c8b05ee103257'/>
<id>4b198940a8d38da33581ea2eef7c8b05ee103257</id>
<content type='text'>
There are more issues with cgroup_find_parent function:

1.
The cgroup_find_parent expects, that it's argument is group in
cg_mount_table[0] controller, which is not always the case.

IMHO the function should accept complete struct cgroup and find real parent.

2.
when checking the st_dev of the group and it's parent to prevent
"underflow" to real filesystem, actually the parent and it's parent are
checked instead of group and it's parent.

In addition, I enhanced the function to return real error code when something
goes wrong.

Open question is, if the function should return just char* as parent's
name or whole struct cgroup*. The second case is more natural - we should
work with groups and not group names, but in some cases just the name is
needed and whole cgroup creation would be unnecessary overhead (I have
prepared cgcdelete tool, which needs just parent's name).

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are more issues with cgroup_find_parent function:

1.
The cgroup_find_parent expects, that it's argument is group in
cg_mount_table[0] controller, which is not always the case.

IMHO the function should accept complete struct cgroup and find real parent.

2.
when checking the st_dev of the group and it's parent to prevent
"underflow" to real filesystem, actually the parent and it's parent are
checked instead of group and it's parent.

In addition, I enhanced the function to return real error code when something
goes wrong.

Open question is, if the function should return just char* as parent's
name or whole struct cgroup*. The second case is more natural - we should
work with groups and not group names, but in some cases just the name is
needed and whole cgroup creation would be unnecessary overhead (I have
prepared cgcdelete tool, which needs just parent's name).

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a process name to the log of cgrulesengd daemon.</title>
<updated>2009-07-07T14:35:21+00:00</updated>
<author>
<name>Ken'ichi Ohmichi</name>
<email>oomichi@mxs.nes.nec.co.jp</email>
</author>
<published>2009-07-06T04:42:36+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=b75a9fcfab5cd2ae88a55934e22c77cbd6810a14'/>
<id>b75a9fcfab5cd2ae88a55934e22c77cbd6810a14</id>
<content type='text'>
Hi,

Current cgrulesengd daemon changes the cgroup of each process by a rule
based on uid, gid, and process name. And it is good that the log of the
daemon contains a process name with uid and gid.
This patch adds a process name to the log message.

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,

Current cgrulesengd daemon changes the cgroup of each process by a rule
based on uid, gid, and process name. And it is good that the log of the
daemon contains a process name with uid and gid.
This patch adds a process name to the log message.

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>Reduce "Cgroup change for PID:X, UID:X, GID:X FAILED!" messages.</title>
<updated>2009-07-07T14:35:21+00:00</updated>
<author>
<name>Ken'ichi Ohmichi</name>
<email>oomichi@mxs.nes.nec.co.jp</email>
</author>
<published>2009-07-06T04:23:44+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=898a4f46a4bc7b75209976b3c2fe6bafd6e2faa0'/>
<id>898a4f46a4bc7b75209976b3c2fe6bafd6e2faa0</id>
<content type='text'>
Hi,

Changelog since v1:
===================
 * Rebase the latest code.
 * Cleanup.

The log message "Cgroup change for PID:X, UID:X, GID:X FAILED!" is output
by cgrulesengd daemon, even if a process finished already and that is not
a problem.
This patch prevents the daemon from outputting this spam log message.

* Reference
  [PATCH 2/2] Reduce "Cgroup change for PID:X, UID:X, GID:X FAILED!" messages.
  http://sourceforge.net/mailarchive/message.php?msg_name=4A10EE7E.60403%40mxs.nes.nec.co.jp

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 since v1:
===================
 * Rebase the latest code.
 * Cleanup.

The log message "Cgroup change for PID:X, UID:X, GID:X FAILED!" is output
by cgrulesengd daemon, even if a process finished already and that is not
a problem.
This patch prevents the daemon from outputting this spam log message.

* Reference
  [PATCH 2/2] Reduce "Cgroup change for PID:X, UID:X, GID:X FAILED!" messages.
  http://sourceforge.net/mailarchive/message.php?msg_name=4A10EE7E.60403%40mxs.nes.nec.co.jp

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>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>
</feed>
