Re: [PATCH 2/9] Containers (V9): Example CPU accounting subsystem

2007-05-01 Thread Balbir Singh
[EMAIL PROTECTED] wrote: + +/* Lazily update the load calculation if necessary. Called with ca locked */ +static void cpuusage_update(struct cpuacct *ca) +{ + u64 now = get_jiffies_64(); + /* If we're not due for an update, return */ + if (ca->next_interval_check > now) +

[PATCH 2/9] Containers (V9): Example CPU accounting subsystem

2007-04-27 Thread menage
This example demonstrates how to use the generic container subsystem for a simple resource tracker that counts, for the processes in a container, the total CPU time used and the %CPU used in the last complete 10 second interval. Portions contributed by Balbir Singh <[EMAIL PROTECTED]> Signed-off-