[PATCH] improve precision of idle time detection.

Increase the precision of the idle time calculation that is exported
to user space via /sys/devices/system/cpu/cpu<x>/idle_time_us

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
此提交包含在:
Martin Schwidefsky
2008-12-31 15:11:40 +01:00
父節點 aa5e97ce4b
當前提交 6f43092441
共有 4 個檔案被更改,包括 62 行新增38 行删除

查看文件

@@ -14,7 +14,6 @@
struct s390_idle_data {
spinlock_t lock;
unsigned int in_idle;
unsigned long long idle_count;
unsigned long long idle_enter;
unsigned long long idle_time;
@@ -26,7 +25,7 @@ void s390_idle_leave(void);
static inline void s390_idle_check(void)
{
if ((&__get_cpu_var(s390_idle))->in_idle)
if ((&__get_cpu_var(s390_idle))->idle_enter != 0ULL)
s390_idle_leave();
}