<feed xmlns='http://www.w3.org/2005/Atom'>
<title>libcg.git/src, branch devel/config3</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>Make cgclear quiert when there is nothing to clear.</title>
<updated>2009-12-22T08:24:04+00:00</updated>
<author>
<name>Jan Safranek</name>
<email>jsafrane@redhat.com</email>
</author>
<published>2009-12-22T08:24:04+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=054e8bb87a19d9a69d6c4ea509a8d2d4cb70aa01'/>
<id>054e8bb87a19d9a69d6c4ea509a8d2d4cb70aa01</id>
<content type='text'>
Cgclear clears and unmounts all controllers. Therefore I think it's not an
error when there is nothing to clear and unmount.

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Cgclear clears and unmounts all controllers. Therefore I think it's not an
error when there is nothing to clear and unmount.

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove trailing space from lssubsys output</title>
<updated>2009-12-22T08:23:39+00:00</updated>
<author>
<name>Jan Safranek</name>
<email>jsafrane@redhat.com</email>
</author>
<published>2009-12-22T08:23:39+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=bb84d7259cc21e0f354e210d3dd1266668ed9642'/>
<id>bb84d7259cc21e0f354e210d3dd1266668ed9642</id>
<content type='text'>
Remove trailing space from lssubsys output, it can confuse scripts.

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
Acked-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove trailing space from lssubsys output, it can confuse scripts.

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
Acked-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix reading of empty parameter values</title>
<updated>2009-12-22T08:16:48+00:00</updated>
<author>
<name>Jan Safranek</name>
<email>jsafrane@redhat.com</email>
</author>
<published>2009-12-22T08:16:48+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=902795e9a894bd6d5836c0e473bdafe5669a7dc1'/>
<id>902795e9a894bd6d5836c0e473bdafe5669a7dc1</id>
<content type='text'>
When a group parameter has empty value (like uninitialized cpuset.cpus),
libcgroup does not return this parameter value - it returns
ECGROUPVALUENOTEXIST instead.

I think reading whole parameter file instead of just '%s' is the right thing
to do - it helps also with multiline values, like cpuacct.stat.

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a group parameter has empty value (like uninitialized cpuset.cpus),
libcgroup does not return this parameter value - it returns
ECGROUPVALUENOTEXIST instead.

I think reading whole parameter file instead of just '%s' is the right thing
to do - it helps also with multiline values, like cpuacct.stat.

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix error text on failed reading of parameter.</title>
<updated>2009-12-22T08:16:45+00:00</updated>
<author>
<name>Jan Safranek</name>
<email>jsafrane@redhat.com</email>
</author>
<published>2009-12-22T08:16:45+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=a875ed35ec110a68c02b95762547f1989e2c6fb6'/>
<id>a875ed35ec110a68c02b95762547f1989e2c6fb6</id>
<content type='text'>
ECGROUPVALUENOTEXIST is translated by cgroup_strerr to "Cgroup trying to set
value for control that does not exist". This is wrong, because the error
code is being returned also when *reading* non-existing value,

I propose "Cgroup, requested group parameter does not exist".

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ECGROUPVALUENOTEXIST is translated by cgroup_strerr to "Cgroup trying to set
value for control that does not exist". This is wrong, because the error
code is being returned also when *reading* non-existing value,

I propose "Cgroup, requested group parameter does not exist".

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cgget tool</title>
<updated>2009-12-22T08:15:10+00:00</updated>
<author>
<name>Jan Safranek</name>
<email>jsafrane@redhat.com</email>
</author>
<published>2009-12-22T08:15:10+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=fae7c60f41702ff04ccaf81c8825bb63ba1393e7'/>
<id>fae7c60f41702ff04ccaf81c8825bb63ba1393e7</id>
<content type='text'>
Add a tool to query for parameter values. The syntax is very similar to cgset,
including IMHO ugly group specification without list of controllers.

Usage:
cgget [-nv] -r &lt;param. name&gt; [-r &lt;param. name&gt;] [...] &lt;path to group&gt; [...]

 -n - no headers
 -v - print values only (no parameter names)

Example:

$ cgget -r cpuset.cpus / /second
/:
cpuset.cpus=0-1

/second:
cpuset.cpus=1

$ cgget -nv -r cpuset.cpus / /second
0-1
1

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a tool to query for parameter values. The syntax is very similar to cgset,
including IMHO ugly group specification without list of controllers.

Usage:
cgget [-nv] -r &lt;param. name&gt; [-r &lt;param. name&gt;] [...] &lt;path to group&gt; [...]

 -n - no headers
 -v - print values only (no parameter names)

Example:

$ cgget -r cpuset.cpus / /second
/:
cpuset.cpus=0-1

/second:
cpuset.cpus=1

$ cgget -nv -r cpuset.cpus / /second
0-1
1

Signed-off-by: Jan Safranek &lt;jsafrane@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libcgroup: trivial: Fix typo</title>
<updated>2009-12-16T10:14:34+00:00</updated>
<author>
<name>Dhaval Giani</name>
<email>dhaval@linux.vnet.ibm.com</email>
</author>
<published>2009-12-16T10:14:34+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=2f9ed3dcd9cc3a7b73f42a8b85cd7968b36bf01c'/>
<id>2f9ed3dcd9cc3a7b73f42a8b85cd7968b36bf01c</id>
<content type='text'>
opened is spelled as opened and not opend

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>
opened is spelled as opened and not opend

Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix an invalid access to yytext.</title>
<updated>2009-12-16T08:36:40+00:00</updated>
<author>
<name>Ken'ichi Ohmichi</name>
<email>oomichi@mxs.nes.nec.co.jp</email>
</author>
<published>2009-12-11T03:22:19+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=296a3aade28ab5d5d5cdeb4c1b046eb87af54384'/>
<id>296a3aade28ab5d5d5cdeb4c1b046eb87af54384</id>
<content type='text'>
Hi,

I tested "cgconfig" service with a big /etc/cgconfig.conf file, and the
service failed by signal SIGSEGV.
There are two problems. The first is that "cgconfig" service fails with
a big /etc/cgconfig.conf file. The second is that the error handling is
stopped by signal SIGSEGV.
This patch fixes the second problem.

The following is the gdb output of the problem.
You can see the problem happens in yyerror().

 # gdb cgconfigparser
 (gdb) run -l /etc/cgconfig.conf
 Starting program: /usr/local/sbin/cgconfigparser -l /etc/cgconfig.conf
 [Thread debugging using libthread_db enabled]
 [New Thread 139764254320624 (LWP 15169)]

 Program received signal SIGSEGV, Segmentation fault.
 [Switching to Thread 139764254320624 (LWP 15169)]
 0x00007f1d66bd1604 in yyerror (s=0x7f1d66bd955a "syntax error") at parse.y:30
 30              fprintf(stderr, "error at line number %d at %c:%s", line_no, *yytext,
 (gdb) bt
 #0  0x00007f1d66bd1604 in yyerror (s=0x7f1d66bd955a "syntax error")
     at parse.y:30
 #1  0x00007f1d66bd1a9e in yyparse () at parse.c:1689
 #2  0x00007f1d66bd79b5 in cgroup_config_load_config (
     pathname=&lt;value optimized out&gt;) at config.c:467
 #3  0x00000000004008a3 in main (argc=3, argv=0x7fffa20c8358) at cgconfig.c:60
 (gdb)

This problem is due to an invalid access to yytext, and this patch fixes it.
(If you need a big /etc/cgconfig.conf file for reproducing the problem,
please let me know it. I will send it to you without the mailing list.)

Thanks
Ken'ichi Ohmichi

Signed-off-by: Ken'ichi Ohmichi &lt;oomichi@mxs.nes.nec.co.jp&gt;
Acked-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.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>
Hi,

I tested "cgconfig" service with a big /etc/cgconfig.conf file, and the
service failed by signal SIGSEGV.
There are two problems. The first is that "cgconfig" service fails with
a big /etc/cgconfig.conf file. The second is that the error handling is
stopped by signal SIGSEGV.
This patch fixes the second problem.

The following is the gdb output of the problem.
You can see the problem happens in yyerror().

 # gdb cgconfigparser
 (gdb) run -l /etc/cgconfig.conf
 Starting program: /usr/local/sbin/cgconfigparser -l /etc/cgconfig.conf
 [Thread debugging using libthread_db enabled]
 [New Thread 139764254320624 (LWP 15169)]

 Program received signal SIGSEGV, Segmentation fault.
 [Switching to Thread 139764254320624 (LWP 15169)]
 0x00007f1d66bd1604 in yyerror (s=0x7f1d66bd955a "syntax error") at parse.y:30
 30              fprintf(stderr, "error at line number %d at %c:%s", line_no, *yytext,
 (gdb) bt
 #0  0x00007f1d66bd1604 in yyerror (s=0x7f1d66bd955a "syntax error")
     at parse.y:30
 #1  0x00007f1d66bd1a9e in yyparse () at parse.c:1689
 #2  0x00007f1d66bd79b5 in cgroup_config_load_config (
     pathname=&lt;value optimized out&gt;) at config.c:467
 #3  0x00000000004008a3 in main (argc=3, argv=0x7fffa20c8358) at cgconfig.c:60
 (gdb)

This problem is due to an invalid access to yytext, and this patch fixes it.
(If you need a big /etc/cgconfig.conf file for reproducing the problem,
please let me know it. I will send it to you without the mailing list.)

Thanks
Ken'ichi Ohmichi

Signed-off-by: Ken'ichi Ohmichi &lt;oomichi@mxs.nes.nec.co.jp&gt;
Acked-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix a memory leak in "cgconfig" service.</title>
<updated>2009-12-16T08:36:39+00:00</updated>
<author>
<name>Ken'ichi Ohmichi</name>
<email>oomichi@mxs.nes.nec.co.jp</email>
</author>
<published>2009-12-09T06:47:26+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=bf09f042ac65dacc776279da948abd39c8e9d36b'/>
<id>bf09f042ac65dacc776279da948abd39c8e9d36b</id>
<content type='text'>
Hi,

When I operated "cgconfig" service on valgrind, I found a memory leak
like the following:

  # cat /etc/cgconfig.conf
  mount {
    cpuset = /cgroup/cpuset;
    cpu    = /cgroup/cpu;
    memory = /cgroup/memory;
  }
  group user000 {
    cpuset {
        cpuset.cpus = 0;
        cpuset.mems = 0;
    }
  }
  group user000/sleep000 {
    cpuset {
        cpuset.cpus = 0;
        cpuset.mems = 0;
    }
  }

  # valgrind --tool=memcheck --leak-check=yes cgconfigparser -l /etc/cgconfig.conf
  ==13095== Memcheck, a memory error detector.
  ==13095== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al.
  ==13095== Using LibVEX rev 1658, a library for dynamic binary translation.
  ==13095== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
  ==13095== Using valgrind-3.2.1, a dynamic binary instrumentation framework.
  ==13095== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al.
  ==13095== For more details, rerun with: -v
  ==13095==
  ==13095==
  ==13095== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 4 from 1)
  ==13095== malloc/free: in use at exit: 43,062 bytes in 10 blocks.
  ==13095== malloc/free: 129 allocs, 119 frees, 85,399 bytes allocated.
  ==13095== For counts of detected errors, rerun with: -v
  ==13095== searching for pointers to 10 not-freed blocks.
  ==13095== checked 6,795,480 bytes.
  ==13095==
  ==13095== 28 bytes in 2 blocks are definitely lost in loss record 1 of 5
  ==13095==    at 0x4A0590B: realloc (vg_replace_malloc.c:306)
  ==13095==    by 0x4C0CC24: yyparse (parse.y:117)
  ==13095==    by 0x4C12914: cgroup_config_load_config (config.c:467)
  ==13095==    by 0x4008A2: main (cgconfig.c:60)
  ==13095==
  ==13095== LEAK SUMMARY:
  ==13095==    definitely lost: 28 bytes in 2 blocks.
  ==13095==      possibly lost: 0 bytes in 0 blocks.
  ==13095==    still reachable: 43,034 bytes in 8 blocks.
  ==13095==         suppressed: 0 bytes in 0 blocks.
  ==13095== Reachable blocks (those to which a pointer was found) are not shown.
  ==13095== To see them, rerun with: --show-reachable=yes
  #

This patch fixes the memory leak.

Thanks
Ken'ichi Ohmichi

Signed-off-by: Ken'ichi Ohmichi &lt;oomichi@mxs.nes.nec.co.jp&gt;
Acked-by: Balbir Singh &lt;balbir@linux.vnet.ibm.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>
Hi,

When I operated "cgconfig" service on valgrind, I found a memory leak
like the following:

  # cat /etc/cgconfig.conf
  mount {
    cpuset = /cgroup/cpuset;
    cpu    = /cgroup/cpu;
    memory = /cgroup/memory;
  }
  group user000 {
    cpuset {
        cpuset.cpus = 0;
        cpuset.mems = 0;
    }
  }
  group user000/sleep000 {
    cpuset {
        cpuset.cpus = 0;
        cpuset.mems = 0;
    }
  }

  # valgrind --tool=memcheck --leak-check=yes cgconfigparser -l /etc/cgconfig.conf
  ==13095== Memcheck, a memory error detector.
  ==13095== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al.
  ==13095== Using LibVEX rev 1658, a library for dynamic binary translation.
  ==13095== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
  ==13095== Using valgrind-3.2.1, a dynamic binary instrumentation framework.
  ==13095== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al.
  ==13095== For more details, rerun with: -v
  ==13095==
  ==13095==
  ==13095== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 4 from 1)
  ==13095== malloc/free: in use at exit: 43,062 bytes in 10 blocks.
  ==13095== malloc/free: 129 allocs, 119 frees, 85,399 bytes allocated.
  ==13095== For counts of detected errors, rerun with: -v
  ==13095== searching for pointers to 10 not-freed blocks.
  ==13095== checked 6,795,480 bytes.
  ==13095==
  ==13095== 28 bytes in 2 blocks are definitely lost in loss record 1 of 5
  ==13095==    at 0x4A0590B: realloc (vg_replace_malloc.c:306)
  ==13095==    by 0x4C0CC24: yyparse (parse.y:117)
  ==13095==    by 0x4C12914: cgroup_config_load_config (config.c:467)
  ==13095==    by 0x4008A2: main (cgconfig.c:60)
  ==13095==
  ==13095== LEAK SUMMARY:
  ==13095==    definitely lost: 28 bytes in 2 blocks.
  ==13095==      possibly lost: 0 bytes in 0 blocks.
  ==13095==    still reachable: 43,034 bytes in 8 blocks.
  ==13095==         suppressed: 0 bytes in 0 blocks.
  ==13095== Reachable blocks (those to which a pointer was found) are not shown.
  ==13095== To see them, rerun with: --show-reachable=yes
  #

This patch fixes the memory leak.

Thanks
Ken'ichi Ohmichi

Signed-off-by: Ken'ichi Ohmichi &lt;oomichi@mxs.nes.nec.co.jp&gt;
Acked-by: Balbir Singh &lt;balbir@linux.vnet.ibm.com&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix compilation outside of source directory</title>
<updated>2009-12-16T08:36:39+00:00</updated>
<author>
<name>Jan Safranek</name>
<email>jsafrane@redhat.com</email>
</author>
<published>2009-12-14T08:22:36+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=ccf9ad6d879cec4ca7a9620ebe28a53b4568b5d4'/>
<id>ccf9ad6d879cec4ca7a9620ebe28a53b4568b5d4</id>
<content type='text'>
Configure script can be invoked outside of source directory, which allows
to compile sources without spoiling the source directory with compilation
artifacts (like .o files). This patch tries to fix our Makefiles to allow
this to work.

You can test it in current GIT checkout (in the root dir):
# mkdir build; cd build; ../configure; make

As result, you should see all binary files in the 'build' directory.

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>
Configure script can be invoked outside of source directory, which allows
to compile sources without spoiling the source directory with compilation
artifacts (like .o files). This patch tries to fix our Makefiles to allow
this to work.

You can test it in current GIT checkout (in the root dir):
# mkdir build; cd build; ../configure; make

As result, you should see all binary files in the 'build' directory.

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>Fix cgroup_get_all_controller_{begin, next, end} api</title>
<updated>2009-12-16T08:33:20+00:00</updated>
<author>
<name>Ivana Hutarova Varekova</name>
<email>varekova@redhat.com</email>
</author>
<published>2009-12-10T12:26:00+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/jsafrane/public_git/libcg.git/commit/?id=f39390ba9456ceda64fb0422d1f4d40d9352b00c'/>
<id>f39390ba9456ceda64fb0422d1f4d40d9352b00c</id>
<content type='text'>
remove the cgroup_initialized need from all of them - not needed

Signed-off-by: Ivana Hutarova Varekova &lt;varekova@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>
remove the cgroup_initialized need from all of them - not needed

Signed-off-by: Ivana Hutarova Varekova &lt;varekova@redhat.com&gt;
Signed-off-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
