On 2013/10/24 1:04, Dhaval Giani wrote:
> Hi Weng,
> 
> Would something similar to the attached patch help you? This of course
> is completely untested (it seems to build).
> 
> Ideally the list I have made would be setup better, and extensible,
> and we just track the dependencies there for specific controllers.
> That way we are limiting the churn needed. (And probably prefer using
> something better than bubble sort :P)
> 
> Thanks!
> Dhaval
> 

Hi Dhaval,

Thanks for your patch! But there is a little problem when I test
the patch, cgconfigparser command report "Segmentation fault".
It seems caused by the following code:


+       for (i = 0; i < cgroup->index; i++) {
+loop:
+               if(!strncmp(cgroup->controller[i]->name, "memory", 
strlen("memory")))
+                       goto memory;
+       }
+       return;
+memory:
+
+       cg_sort_mem_values(cgroup->controller[i]);
+       i++;                                       <---------when i increased, 
the code doesn't
+       goto loop;                                           check "i < 
cgroup->index" before goto loop
+}

after add check "i < cgroup->index"  before goto loop, the cg_sort_mem_values()
still doesn't resort the memory.memsw.limit_in_bytes and memort.limit_in_bytes.
The cgconfigparser still failed for same reason:

cgconfigparser -l config
/usr/local/sbin/cgconfigparser; error loading config: Failed to remove a 
non-empty group

Thanks!
Weng Meiling


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to