On Monday 29 October 2012 02:54:56 you wrote:
> just for info the patches are still in process now.
Saw that, I was proposing a different perspective, but - as I'm not a 
cgroup/kernel expert I really appreciate  your opinions! Consider everything 
that follows as a imho/iirc/iiuc/whatever.

> The design of this feature is described e.g. in
> http://sourceforge.net/mailarchive/forum.php?thread_name=502209A3.70809%40r
> edhat.com&forum_name=libcg-devel
That's a cgred feature: reads the template from config, then creates the 
relative cgroup. 

If I change the template will the already created cgroups be changed?


I imagine a template group as a "real" cgroup (but with no /tasks assigned), 
listed in mounts, and dynamically modifiable via cgroup calls. 

Its subgroups inherit its settings. This would avoid the prolification of 
cgroups ensuring that a "pool" of groups has the same settings.

A drawback is that it should be done in kernel space, but for what I saw I'm 
not sure it would be this complex (on that your knowledge would be helpful).

Some cases follow.

Case 1: create a template cgroup
 - it appears in /cgroup/mem_and_cpu/my_template
 - its limits are not enforced
 - it contains /cgroup/mem_and_cpu/my_template/template set to 1
 - its tasks file is empty:  /cgroup/mem_and_cpu/tasks
 - subgroups  of template group inherit its settings

Case 2: create a user subgroup of  /cgroup/mem_and_cpu/my_template
 # mkdir  /cgroup/mem_and_cpu/my_template/jon/
 - my_template/jon inherit settings from my_template
 - resource counting is incremental instead of shared:
    - ex. a) my_template/blkio.weight=100 
            b)  my_template/ has jon, mary subgroups
            c) then the real my_template/blkio.weight is 200 
    - ex. I can't edit my_template/jon/ settings directly

Case 3: create a process subgroup of  /cgroup/mem_and_cpu/my_template
 # mkdir  /cgroup/mem_and_cpu/my_template/$PID
  - this could be done with your cgred patch too
  - all the processes inherit the my_template settings


Hope do have been a bit more clear. In any case I'll appreciate your doubts, 
explainations and feedback (eg. "your idea sucks for the following reasons:")

Thx again for your time + Peace,
R.



-- 
Roberto Polli
Community Manager
Babel S.r.l. - http://www.babel.it
T: +39.06.9826.9651 M: +39.340.652.2736 F: +39.06.9826.9680
P.zza S.Benedetto da Norcia, 33 - 00040 Pomezia (Roma)

CONFIDENZIALE: Questo messaggio ed i suoi allegati sono di carattere 
confidenziale per i destinatari in indirizzo.
E' vietato l'inoltro non autorizzato a destinatari diversi da quelli indicati 
nel messaggio originale.
Se ricevuto per errore, l'uso del contenuto e' proibito; si prega di 
comunicarlo al mittente e cancellarlo immediatamente.

------------------------------------------------------------------------------
The Windows 8 Center - In partnership with Sourceforge
Your idea - your app - 30 days.
Get started!
http://windows8center.sourceforge.net/
what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/
_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to