diff options
author | Ingo Molnar <mingo@kernel.org> | 2012-12-08 09:44:43 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-12-08 09:44:43 -0500 |
commit | 38130ec08716ae2ece8060eca01607b58da7258c (patch) | |
tree | 71d0cd76ccfb2b960ddb6b820850269265389052 /arch/s390 | |
parent | e783377e93d4043a11013ce6e9173db34998e653 (diff) | |
parent | 1b2852b152be5150fbef7b585388ec43cf6f4415 (diff) |
Merge tag 'sched-cputime-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks into sched/core
Pull more cputime cleanups from Frederic Weisbecker:
* Get rid of underscores polluting the vtime namespace
* Consolidate context switch and tick handling
* Improve debuggability by detecting irq unsafe callers
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/include/asm/cputime.h | 1 | ||||
-rw-r--r-- | arch/s390/kernel/vtime.c | 13 |
2 files changed, 11 insertions, 3 deletions
diff --git a/arch/s390/include/asm/cputime.h b/arch/s390/include/asm/cputime.h index 023d5ae24482..d2ff41370c0c 100644 --- a/arch/s390/include/asm/cputime.h +++ b/arch/s390/include/asm/cputime.h | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | 15 | ||
16 | #define __ARCH_HAS_VTIME_ACCOUNT | 16 | #define __ARCH_HAS_VTIME_ACCOUNT |
17 | #define __ARCH_HAS_VTIME_TASK_SWITCH | ||
17 | 18 | ||
18 | /* We want to use full resolution of the CPU timer: 2**-12 micro-seconds. */ | 19 | /* We want to use full resolution of the CPU timer: 2**-12 micro-seconds. */ |
19 | 20 | ||
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c index 783e988c4e1e..e84b8b68444a 100644 --- a/arch/s390/kernel/vtime.c +++ b/arch/s390/kernel/vtime.c | |||
@@ -112,7 +112,12 @@ void vtime_task_switch(struct task_struct *prev) | |||
112 | S390_lowcore.system_timer = ti->system_timer; | 112 | S390_lowcore.system_timer = ti->system_timer; |
113 | } | 113 | } |
114 | 114 | ||
115 | void account_process_tick(struct task_struct *tsk, int user_tick) | 115 | /* |
116 | * In s390, accounting pending user time also implies | ||
117 | * accounting system time in order to correctly compute | ||
118 | * the stolen time accounting. | ||
119 | */ | ||
120 | void vtime_account_user(struct task_struct *tsk) | ||
116 | { | 121 | { |
117 | if (do_account_vtime(tsk, HARDIRQ_OFFSET)) | 122 | if (do_account_vtime(tsk, HARDIRQ_OFFSET)) |
118 | virt_timer_expire(); | 123 | virt_timer_expire(); |
@@ -127,6 +132,8 @@ void vtime_account(struct task_struct *tsk) | |||
127 | struct thread_info *ti = task_thread_info(tsk); | 132 | struct thread_info *ti = task_thread_info(tsk); |
128 | u64 timer, system; | 133 | u64 timer, system; |
129 | 134 | ||
135 | WARN_ON_ONCE(!irqs_disabled()); | ||
136 | |||
130 | timer = S390_lowcore.last_update_timer; | 137 | timer = S390_lowcore.last_update_timer; |
131 | S390_lowcore.last_update_timer = get_vtimer(); | 138 | S390_lowcore.last_update_timer = get_vtimer(); |
132 | S390_lowcore.system_timer += timer - S390_lowcore.last_update_timer; | 139 | S390_lowcore.system_timer += timer - S390_lowcore.last_update_timer; |
@@ -140,9 +147,9 @@ void vtime_account(struct task_struct *tsk) | |||
140 | } | 147 | } |
141 | EXPORT_SYMBOL_GPL(vtime_account); | 148 | EXPORT_SYMBOL_GPL(vtime_account); |
142 | 149 | ||
143 | void __vtime_account_system(struct task_struct *tsk) | 150 | void vtime_account_system(struct task_struct *tsk) |
144 | __attribute__((alias("vtime_account"))); | 151 | __attribute__((alias("vtime_account"))); |
145 | EXPORT_SYMBOL_GPL(__vtime_account_system); | 152 | EXPORT_SYMBOL_GPL(vtime_account_system); |
146 | 153 | ||
147 | void __kprobes vtime_stop_cpu(void) | 154 | void __kprobes vtime_stop_cpu(void) |
148 | { | 155 | { |