mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
sched/accounting: Change cpustat fields to an array
This patch changes fields in cpustat from a structure, to an u64 array. Math gets easier, and the code is more flexible. Signed-off-by: Glauber Costa <[email protected]> Reviewed-by: KAMEZAWA Hiroyuki <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Paul Tuner <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
786d6dc7ae
commit
3292beb340
9 changed files with 142 additions and 141 deletions
|
|
@ -81,13 +81,13 @@ static int rackmeter_ignore_nice;
|
|||
*/
|
||||
static inline cputime64_t get_cpu_idle_time(unsigned int cpu)
|
||||
{
|
||||
cputime64_t retval;
|
||||
u64 retval;
|
||||
|
||||
retval = cputime64_add(kstat_cpu(cpu).cpustat.idle,
|
||||
kstat_cpu(cpu).cpustat.iowait);
|
||||
retval = kcpustat_cpu(cpu).cpustat[CPUTIME_IDLE] +
|
||||
kcpustat_cpu(cpu).cpustat[CPUTIME_IOWAIT];
|
||||
|
||||
if (rackmeter_ignore_nice)
|
||||
retval = cputime64_add(retval, kstat_cpu(cpu).cpustat.nice);
|
||||
retval += kcpustat_cpu(cpu).cpustat[CPUTIME_NICE];
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue