History

[PATCH] fix scaled & unscaled cputime accounting

The utimescaled / stimescaled fields in the task structure and the global cpustat should be set on all architectures. On s390 the calls to account_user_time_scaled and account_system_time_scaled never have been added. In addition system time that is accounted as guest time to the user time of a process is accounted to the scaled system time instead of the scaled user time. To fix the bugs and to prevent future forgetfulness this patch merges account_system_time_scaled into account_system_time and account_user_time_scaled into account_user_time.

Martin Schwidefsky committed 17 years ago

Commit 457533a1 parent 6a94cb77 files · +37 −56Browse files

Showing the changes to kernel/timer.c (1 of 7 files). Show all

Unified · Split

kernel/timer.c+5−7
@@ -1023,13 +1023,11 @@ void account_process_tick(struct task_struct *p, int user_tick) · 1022 unmodified lines
1023{1023{
1024 cputime_t one_jiffy = jiffies_to_cputime(1);1024 cputime_t one_jiffy = jiffies_to_cputime(1);
1025 1025
1026 if (user_tick) {1026 if (user_tick)
1027 account_user_time(p, one_jiffy);1027 account_user_time(p, one_jiffy, cputime_to_scaled(one_jiffy));
1028 account_user_time_scaled(p, cputime_to_scaled(one_jiffy));1028 else
1029 } else {1029 account_system_time(p, HARDIRQ_OFFSET, one_jiffy,
1030 account_system_time(p, HARDIRQ_OFFSET, one_jiffy);1030 cputime_to_scaled(one_jiffy));
1031 account_system_time_scaled(p, cputime_to_scaled(one_jiffy));
1032 }
1033}1031}
1034#endif1032#endif
1035 1033