diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-12-31 09:11:40 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-12-31 09:11:47 -0500 |
commit | 6f43092441bda528dd38f2dc6c1e2522c5079fb7 (patch) | |
tree | e8bba1cf80b19be3e3658b9351b32469ba8c6bac /arch/s390/kernel/vtime.c | |
parent | aa5e97ce4bbc9d5daeec16b1d15bb3f6b7b4f4d4 (diff) |
[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>
Diffstat (limited to 'arch/s390/kernel/vtime.c')
-rw-r--r-- | arch/s390/kernel/vtime.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c index 1254a4d0d762..25d21fef76ba 100644 --- a/arch/s390/kernel/vtime.c +++ b/arch/s390/kernel/vtime.c | |||
@@ -112,6 +112,7 @@ EXPORT_SYMBOL_GPL(account_system_vtime); | |||
112 | 112 | ||
113 | static inline void set_vtimer(__u64 expires) | 113 | static inline void set_vtimer(__u64 expires) |
114 | { | 114 | { |
115 | struct vtimer_queue *vq = &__get_cpu_var(virt_cpu_timer); | ||
115 | __u64 timer; | 116 | __u64 timer; |
116 | 117 | ||
117 | asm volatile (" STPT %0\n" /* Store current cpu timer value */ | 118 | asm volatile (" STPT %0\n" /* Store current cpu timer value */ |
@@ -121,7 +122,7 @@ static inline void set_vtimer(__u64 expires) | |||
121 | S390_lowcore.last_update_timer = expires; | 122 | S390_lowcore.last_update_timer = expires; |
122 | 123 | ||
123 | /* store expire time for this CPU timer */ | 124 | /* store expire time for this CPU timer */ |
124 | __get_cpu_var(virt_cpu_timer).to_expire = expires; | 125 | vq->to_expire = expires; |
125 | } | 126 | } |
126 | 127 | ||
127 | void vtime_start_cpu_timer(void) | 128 | void vtime_start_cpu_timer(void) |