Thanks Dhaval for prompt response.
On last issue: can u please explain by "impossible"  below ?
On my system, as I see currently on cgroup VFS (manually) interface (files), if 
there are multiple cgroups on cpu subsystem example names: group1 and group2 
and assign different cpu percent times to each.Then for each group in 'tasks' 
file add process ids: 'echo pid >> tasks'  *same* pid to multiple groups. (a) 
how does subsystems in cgroups handle such and other conflicts rules for a 
particular task  ? (b) how does libcgroup address this ?   (c) Using libcgroup, 
I have a process using C API interface and in parallel, I can manually update 
VFS then how it would overwrite information, right ?
Thanks in advance,

--- On Thu, 10/21/10, Dhaval Giani <[email protected]> wrote:

From: Dhaval Giani <[email protected]>
Subject: Re: [Libcg-devel] questions on libcgroup conf file
To: "ccmail111" <[email protected]>
Cc: [email protected]
Date: Thursday, October 21, 2010, 8:38 AM

On Tue, Oct 19, 2010 at 3:32 AM, ccmail111 <[email protected]> wrote:
>
> resending...
>
> --- On Fri, 10/15/10, ccmail111 <[email protected]> wrote:
>
> From: ccmail111 <[email protected]>
> Subject: questions on libcgroup conf file
> To: [email protected]
> Date: Friday, October 15, 2010, 3:15 AM
>
> Hi,
>
> I am trying to use libcgroup-0.35.1 on RedHat 6.
>
> I have few questions:
>
> I see the lib has C API interface and stores controller/groups config in RAM. 
> How does this backend interface with kernel( aka subsystems ) work ? Does the 
> lib dump or generate a conf file ?

No, you write this configuration file, though now it is possible to
dump the current configuration using cgsnapshot.

> For library to interface with cgroup VFS, is there a need to run crulesengd 
> or any other deamon ?

No.

> To use library, what are the steps needed ?

Use the API, and build linking against the library and run the
application. As long as you have the necessary permissions for the
filesystem group, it will work.

> If I modify conf file (which has groups/subsystems defined) via editor 
> instead of VFS cgroup files, then how does kernel get this update ?

It doesn't. You will need to reload the configuration.

> If a task is in multiple groups and in conflicting and overlapping rules, 
> then which one(s) get applied ? Example: a task is in groupX with cpu 30% 
> slot and also in another groupY with 20%. Does the task get 50% of cpu or 
> average or such ?
>

That is impossible.

Dhaval



      
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to