aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/tick.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2009-11-12 16:12:06 -0500
committerThomas Gleixner <tglx@linutronix.de>2009-11-13 14:46:24 -0500
commit27185016b806d5a1181ff501cae120582b2b27dd (patch)
tree44b0da428fccaea1ad83c537bcc99a80b9251227 /include/linux/tick.h
parent98962465ed9e6ea99c38e0af63fe1dcb5a79dc25 (diff)
nohz: Track last do_timer() cpu
The previous patch which limits the sleep time to the maximum deferment time of the time keeping clocksource has some limitations on SMP machines: if all CPUs are idle then for all CPUs the maximum sleep time is limited. Solve this by keeping track of which cpu had the do_timer() duty assigned last and limit the sleep time only for this cpu. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> LKML-Reference: <new-submission> Cc: Jon Hunter <jon-hunter@ti.com> Cc: John Stultz <johnstul@us.ibm.com>
Diffstat (limited to 'include/linux/tick.h')
-rw-r--r--include/linux/tick.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/tick.h b/include/linux/tick.h
index 8dc082194b22..d2ae79e21be3 100644
--- a/include/linux/tick.h
+++ b/include/linux/tick.h
@@ -43,6 +43,7 @@ enum tick_nohz_mode {
43 * @idle_exittime: Time when the idle state was left 43 * @idle_exittime: Time when the idle state was left
44 * @idle_sleeptime: Sum of the time slept in idle with sched tick stopped 44 * @idle_sleeptime: Sum of the time slept in idle with sched tick stopped
45 * @sleep_length: Duration of the current idle sleep 45 * @sleep_length: Duration of the current idle sleep
46 * @do_timer_lst: CPU was the last one doing do_timer before going idle
46 */ 47 */
47struct tick_sched { 48struct tick_sched {
48 struct hrtimer sched_timer; 49 struct hrtimer sched_timer;
@@ -64,6 +65,7 @@ struct tick_sched {
64 unsigned long last_jiffies; 65 unsigned long last_jiffies;
65 unsigned long next_jiffies; 66 unsigned long next_jiffies;
66 ktime_t idle_expires; 67 ktime_t idle_expires;
68 int do_timer_last;
67}; 69};
68 70
69extern void __init tick_init(void); 71extern void __init tick_init(void);