summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2005-01-11 01:40:53 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-11 01:40:53 -0800
commita6ab0c16edd9bf13db04afc7cd88cb137fe770aa (patch)
treea41cd7657131e2b684005d9a7fc7b3cc3852b25f /include/linux
parent0a71336b6a8858a525007c5b4e0d14ba57f9f315 (diff)
[PATCH] cputime: microsecond based cputime for s390
This patch adds the architecture magic to replace the jiffies based cputime with microsecond based cputime and it adds code to calculate involuntary wait time. With this patch the numbers reported by top and ps when running on LPAR or z/VM are finally not junk anymore. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/hardirq.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h
index ba0fcb34c8cd..ebc712e91066 100644
--- a/include/linux/hardirq.h
+++ b/include/linux/hardirq.h
@@ -4,6 +4,7 @@
#include <linux/config.h>
#include <linux/smp_lock.h>
#include <asm/hardirq.h>
+#include <asm/system.h>
/*
* We put the hardirq and softirq counter into the preemption
@@ -84,7 +85,22 @@ extern void synchronize_irq(unsigned int irq);
#define nmi_enter() irq_enter()
#define nmi_exit() sub_preempt_count(HARDIRQ_OFFSET)
-#define irq_enter() add_preempt_count(HARDIRQ_OFFSET)
+#ifndef CONFIG_VIRT_CPU_ACCOUNTING
+static inline void account_user_vtime(struct task_struct *tsk)
+{
+}
+
+static inline void account_system_vtime(struct task_struct *tsk)
+{
+}
+#endif
+
+#define irq_enter() \
+ do { \
+ account_system_vtime(current); \
+ add_preempt_count(HARDIRQ_OFFSET); \
+ } while (0)
+
extern void irq_exit(void);
#endif /* LINUX_HARDIRQ_H */