[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>
This commit is contained in:
Martin Schwidefsky
2008-12-31 15:11:40 +01:00
parent aa5e97ce4b
commit 6f43092441
4 changed files with 62 additions and 38 deletions

View File

@@ -112,6 +112,7 @@ EXPORT_SYMBOL_GPL(account_system_vtime);
static inline void set_vtimer(__u64 expires)
{
struct vtimer_queue *vq = &__get_cpu_var(virt_cpu_timer);
__u64 timer;
asm volatile (" STPT %0\n" /* Store current cpu timer value */
@@ -121,7 +122,7 @@ static inline void set_vtimer(__u64 expires)
S390_lowcore.last_update_timer = expires;
/* store expire time for this CPU timer */
__get_cpu_var(virt_cpu_timer).to_expire = expires;
vq->to_expire = expires;
}
void vtime_start_cpu_timer(void)