From 0281d847f3a903ab9d0799c5103416d4893fcb34 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sat, 13 Mar 2004 03:25:38 -0800 Subject: [PATCH] Use 64-bit counters for scheduler stats From: Kingsley Cheung A number of scheduler counters wrap around after 47 days. The context-switch counter can wrap around after considerably less time. Convert them to 64-bit values. --- include/linux/kernel_stat.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'include/linux') diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index 17a9656a31fb..4594ccc4a7c1 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h @@ -14,13 +14,13 @@ */ struct cpu_usage_stat { - unsigned int user; - unsigned int nice; - unsigned int system; - unsigned int softirq; - unsigned int irq; - unsigned int idle; - unsigned int iowait; + u64 user; + u64 nice; + u64 system; + u64 softirq; + u64 irq; + u64 idle; + u64 iowait; }; struct kernel_stat { @@ -34,7 +34,7 @@ DECLARE_PER_CPU(struct kernel_stat, kstat); /* Must have preemption disabled for this to be meaningful. */ #define kstat_this_cpu __get_cpu_var(kstat) -extern unsigned long nr_context_switches(void); +extern unsigned long long nr_context_switches(void); /* * Number of interrupts per specific IRQ source, since bootup -- cgit v1.2.3