diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-04-14 09:36:26 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-04-14 09:37:26 -0400 |
commit | b86ccca49cd8f22086c1d135ab3051cf48fb1688 (patch) | |
tree | 2351a8a7680325262cdef293b624fd997ff226bd /arch/s390/kernel | |
parent | 88e012856d05a5d00ae80c691fb7aa5adda268d7 (diff) |
[S390] fix idle time accounting
The steal time is calculated by subtracting the time the virtual cpu
has been running on a physical cpu from the wall clock time. To make
that work all wall time needs to be added to the steal time field first
before the virtual cpu time is subtracted.
The time between the last clock update and the load of the enabled wait
psw needs to be added to the steal_time field as well to make the sum
over all cpu accounting numbers match the wall clock.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r-- | arch/s390/kernel/vtime.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c index 694b44374a2b..c0870a61f90f 100644 --- a/arch/s390/kernel/vtime.c +++ b/arch/s390/kernel/vtime.c | |||
@@ -134,6 +134,8 @@ void vtime_start_cpu(void) | |||
134 | /* Account time spent with enabled wait psw loaded as idle time. */ | 134 | /* Account time spent with enabled wait psw loaded as idle time. */ |
135 | idle_time = S390_lowcore.int_clock - idle->idle_enter; | 135 | idle_time = S390_lowcore.int_clock - idle->idle_enter; |
136 | account_idle_time(idle_time); | 136 | account_idle_time(idle_time); |
137 | S390_lowcore.steal_timer += | ||
138 | idle->idle_enter - S390_lowcore.last_update_clock; | ||
137 | S390_lowcore.last_update_clock = S390_lowcore.int_clock; | 139 | S390_lowcore.last_update_clock = S390_lowcore.int_clock; |
138 | 140 | ||
139 | /* Account system time spent going idle. */ | 141 | /* Account system time spent going idle. */ |