]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.arch/s390-15-09-idle-accounting.diff
Fix oinkmaster patch.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.arch / s390-15-09-idle-accounting.diff
CommitLineData
4d1e5b62
AF
1From: Gerald Schaefer <geraldsc@de.ibm.com>
2Subject: kernel: fix idle time accounting
3References: bnc#518291,LTC#54879
4
5Symptom: The idle time reported in /proc/stat is too large
6Problem: The time spent with time ticks disabled is accounted twice,
7 once by the architecture backend and another time by the
8 generic timer code.
9Solution: Stop accounting idle time in the generic timer code if
10 CONFIG_VIRT_CPU_ACCOUNTING is enabled.
11
12Acked-by: John Jolly <jjolly@suse.de>
13---
14
15 kernel/time/tick-sched.c | 4 ++++
16 1 file changed, 4 insertions(+)
17
18Index: linux-sles11/kernel/time/tick-sched.c
19===================================================================
20--- linux-sles11.orig/kernel/time/tick-sched.c
21+++ linux-sles11/kernel/time/tick-sched.c
22@@ -377,7 +377,9 @@ void tick_nohz_restart_sched_tick(void)
23 {
24 int cpu = smp_processor_id();
25 struct tick_sched *ts = &per_cpu(tick_cpu_sched, cpu);
26+#ifndef CONFIG_VIRT_CPU_ACCOUNTING
27 unsigned long ticks;
28+#endif
29 ktime_t now;
30
31 local_irq_disable();
32@@ -399,6 +401,7 @@ void tick_nohz_restart_sched_tick(void)
33 tick_do_update_jiffies64(now);
34 cpu_clear(cpu, nohz_cpu_mask);
35
36+#ifndef CONFIG_VIRT_CPU_ACCOUNTING
37 /*
38 * We stopped the tick in idle. Update process times would miss the
39 * time we slept as update_process_times does only a 1 tick
40@@ -414,6 +417,7 @@ void tick_nohz_restart_sched_tick(void)
41 jiffies_to_cputime(ticks));
42 sub_preempt_count(HARDIRQ_OFFSET);
43 }
44+#endif
45
46 touch_softlockup_watchdog();
47 /*