[PATCH] tick-management: dyntick / highres functionality
authorThomas Gleixner <tglx@linutronix.de>
Fri, 16 Feb 2007 09:28:03 +0000 (01:28 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 16 Feb 2007 16:13:59 +0000 (08:13 -0800)
With Ingo Molnar <mingo@elte.hu>

Add functions to provide dynamic ticks and high resolution timers.  The code
which keeps track of jiffies and handles the long idle periods is shared
between tick based and high resolution timer based dynticks.  The dyntick
functionality can be disabled on the kernel commandline.  Provide also the
infrastructure to support high resolution timers.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 files changed:
Documentation/kernel-parameters.txt
include/linux/hardirq.h
include/linux/hrtimer.h
include/linux/tick.h
kernel/hrtimer.c
kernel/softirq.c
kernel/time/Kconfig [new file with mode: 0644]
kernel/time/Makefile
kernel/time/clocksource.c
kernel/time/tick-broadcast.c
kernel/time/tick-common.c
kernel/time/tick-internal.h
kernel/time/tick-oneshot.c [new file with mode: 0644]
kernel/time/tick-sched.c [new file with mode: 0644]
kernel/timer.c

index 22b1996..52bf1ed 100644 (file)
@@ -1078,6 +1078,10 @@ and is between 256 and 4096 characters. It is defined in the file
                        in certain environments such as networked servers or
                        real-time systems.
 
+       nohz=           [KNL] Boottime enable/disable dynamic ticks
+                       Valid arguments: on, off
+                       Default: on
+
        noirqbalance    [IA-32,SMP,KNL] Disable kernel irq balancing
 
        noirqdebug      [IA-32] Disables the code which attempts to detect and
index 6f657d7..7803014 100644 (file)
@@ -106,6 +106,16 @@ static inline void account_system_vtime(struct task_struct *tsk)
  * always balanced, so the interrupted value of ->hardirq_context
  * will always be restored.
  */
+#define __irq_enter()                                  \
+       do {                                            \
+               account_system_vtime(current);          \
+               add_preempt_count(HARDIRQ_OFFSET);      \
+               trace_hardirq_enter();                  \
+       } while (0)
+
+/*
+ * Enter irq context (on NO_HZ, update jiffies):
+ */
 extern void irq_enter(void);
 
 /*
@@ -123,7 +133,7 @@ extern void irq_enter(void);
  */
 extern void irq_exit(void);
 
-#define nmi_enter()            do { lockdep_off(); irq_enter(); } while (0)
+#define nmi_enter()            do { lockdep_off(); __irq_enter(); } while (0)
 #define nmi_exit()             do { __irq_exit(); lockdep_on(); } while (0)
 
 #endif /* LINUX_HARDIRQ_H */
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc kernel/timer.c
Simple merge