* - extend-next_timer_interrupt-to-use-a-reference-jiffie.patch removed from -mm tree
@ 2007-02-17 7:14 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2007-02-17 7:14 UTC (permalink / raw)
To: tglx, bunk, cotte, johnstul, mingo, zippel, mm-commits
The patch titled
Extend next_timer_interrupt() to use a reference jiffie
has been removed from the -mm tree. Its filename was
extend-next_timer_interrupt-to-use-a-reference-jiffie.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
Subject: Extend next_timer_interrupt() to use a reference jiffie
From: Thomas Gleixner <tglx@linutronix.de>
For CONFIG_NO_HZ we need to calculate the next timer wheel event based on a
given jiffie value. Extend the existing code to allow the extra 'now'
argument. Provide a compability function for the existing implementations to
call the function with now == jiffies. (This also solves the racyness of the
original code vs. jiffies changing during the iteration.)
No functional changes to existing users of this infrastructure.
[ remove WARN_ON() that triggered on s390, by Carsten Otte <cotte@de.ibm.com> ]
[ made new helper static, Adrian Bunk <bunk@stusta.de> ]
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>
---
include/linux/timer.h | 10 ++++++++++
kernel/hrtimer.c | 2 +-
kernel/timer.c | 14 +++++++++++---
3 files changed, 22 insertions(+), 4 deletions(-)
diff -puN include/linux/timer.h~extend-next_timer_interrupt-to-use-a-reference-jiffie include/linux/timer.h
--- a/include/linux/timer.h~extend-next_timer_interrupt-to-use-a-reference-jiffie
+++ a/include/linux/timer.h
@@ -61,7 +61,17 @@ extern int del_timer(struct timer_list *
extern int __mod_timer(struct timer_list *timer, unsigned long expires);
extern int mod_timer(struct timer_list *timer, unsigned long expires);
+/*
+ * Return when the next timer-wheel timeout occurs (in absolute jiffies),
+ * locks the timer base:
+ */
extern unsigned long next_timer_interrupt(void);
+/*
+ * Return when the next timer-wheel timeout occurs (in absolute jiffies),
+ * locks the timer base and does the comparison against the given
+ * jiffie.
+ */
+extern unsigned long get_next_timer_interrupt(unsigned long now);
/**
* add_timer - start a timer
diff -puN kernel/hrtimer.c~extend-next_timer_interrupt-to-use-a-reference-jiffie kernel/hrtimer.c
--- a/kernel/hrtimer.c~extend-next_timer_interrupt-to-use-a-reference-jiffie
+++ a/kernel/hrtimer.c
@@ -533,7 +533,7 @@ ktime_t hrtimer_get_remaining(const stru
}
EXPORT_SYMBOL_GPL(hrtimer_get_remaining);
-#ifdef CONFIG_NO_IDLE_HZ
+#if defined(CONFIG_NO_IDLE_HZ) || defined(CONFIG_NO_HZ)
/**
* hrtimer_get_next_event - get the time until next expiry event
*
diff -puN kernel/timer.c~extend-next_timer_interrupt-to-use-a-reference-jiffie kernel/timer.c
--- a/kernel/timer.c~extend-next_timer_interrupt-to-use-a-reference-jiffie
+++ a/kernel/timer.c
@@ -591,7 +591,7 @@ static inline void __run_timers(tvec_bas
spin_unlock_irq(&base->lock);
}
-#ifdef CONFIG_NO_IDLE_HZ
+#if defined(CONFIG_NO_IDLE_HZ) || defined(CONFIG_NO_HZ)
/*
* Find out when the next timer event is due to happen. This
* is used on S/390 to stop all activity when a cpus is idle.
@@ -687,10 +687,10 @@ static unsigned long cmp_next_hrtimer_ev
/**
* next_timer_interrupt - return the jiffy of the next pending timer
*/
-unsigned long next_timer_interrupt(void)
+unsigned long get_next_timer_interrupt(unsigned long now)
{
tvec_base_t *base = __get_cpu_var(tvec_bases);
- unsigned long expires, now = jiffies;
+ unsigned long expires;
spin_lock(&base->lock);
expires = __next_timer_interrupt(base);
@@ -701,6 +701,14 @@ unsigned long next_timer_interrupt(void)
return cmp_next_hrtimer_event(now, expires);
}
+
+#ifdef CONFIG_NO_IDLE_HZ
+unsigned long next_timer_interrupt(void)
+{
+ return get_next_timer_interrupt(jiffies);
+}
+#endif
+
#endif
/******************************************************************/
_
Patches currently in -mm which might be from tglx@linutronix.de are
origin.patch
git-acpi.patch
git-block.patch
scheduled-removal-of-sa_xxx-interrupt-flags-fixups-3.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-02-17 7:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-17 7:14 - extend-next_timer_interrupt-to-use-a-reference-jiffie.patch removed from -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.