diff options
author | Arun R Bharadwaj <arun@linux.vnet.ibm.com> | 2009-04-16 12:13:26 +0530 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-05-13 16:52:42 +0200 |
commit | 597d0275736dad9c3bda6f0a00a1c477dc0f37b1 (patch) | |
tree | 7ebbe9f80fb13a3ec34ea997d00c21eecf7699ae /include/linux/timer.h | |
parent | a04198887658e1d8ae25f5420035c057cb170e67 (diff) | |
download | linux-stable-597d0275736dad9c3bda6f0a00a1c477dc0f37b1.tar.gz linux-stable-597d0275736dad9c3bda6f0a00a1c477dc0f37b1.tar.bz2 linux-stable-597d0275736dad9c3bda6f0a00a1c477dc0f37b1.zip |
timers: Framework for identifying pinned timers
* Arun R Bharadwaj <arun@linux.vnet.ibm.com> [2009-04-16 12:11:36]:
This patch creates a new framework for identifying cpu-pinned timers
and hrtimers.
This framework is needed because pinned timers are expected to fire on
the same CPU on which they are queued. So it is essential to identify
these and not migrate them, in case there are any.
For regular timers, the currently existing add_timer_on() can be used
queue pinned timers and subsequently mod_timer_pinned() can be used
to modify the 'expires' field.
For hrtimers, new modes HRTIMER_ABS_PINNED and HRTIMER_REL_PINNED are
added to queue cpu-pinned hrtimer.
[ tglx: use .._PINNED mode argument instead of creating tons of new
functions ]
Signed-off-by: Arun R Bharadwaj <arun@linux.vnet.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/timer.h')
-rw-r--r-- | include/linux/timer.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/timer.h b/include/linux/timer.h index 6cdb6f3331f1..ccf882eed8f8 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h @@ -163,7 +163,10 @@ extern void add_timer_on(struct timer_list *timer, int cpu); extern int del_timer(struct timer_list * timer); extern int mod_timer(struct timer_list *timer, unsigned long expires); extern int mod_timer_pending(struct timer_list *timer, unsigned long expires); +extern int mod_timer_pinned(struct timer_list *timer, unsigned long expires); +#define TIMER_NOT_PINNED 0 +#define TIMER_PINNED 1 /* * The jiffies value which is added to now, when there is no timer * in the timer wheel: |