On 06/29/2012 02:14 PM, Dhaval Giani wrote:
>>> 2. Now, a bad user might entail doing a cgroup_get_cgroup every time.
>>> However, doing a cgroup_get_cgroup once and then use that cgroup in
>>> the get_value_string API. That would mean this API is not needed in
>>> any case.
>>
>> ENOPARSE.
> 
> Let's say you want, cpu.cpu_shares, cpu.rt_runtime_us, cpu.rt_period_us.
> 
> The correct thing is to do a cgroup_get_cgroup first, and then use the
> cpu controller structure in that to read the values and add to another
> cgroup. But someone being lazy would call the get_value API multiple
> times which would result in cgroup_get_cgroup being called 3 times (in
> this case).

Just people don't know they should do that, because the fact that the
interface is broken is not documented.

The "correct" thing to do is call get_cgroup once, in the cgroup you
plan to modify itself. But that can't be done. Whatever performance
penalty of lack of prettyness you have, is just a consequence of that.



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to