diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2007-05-01 00:24:54 -0400 |
---|---|---|
committer | Dmitry Torokhov <dtor@insightbb.com> | 2007-05-01 00:24:54 -0400 |
commit | bc95f3669f5e6f63cf0b84fe4922c3c6dd4aa775 (patch) | |
tree | 427fcf2a7287c16d4b5aa6cbf494d59579a6a8b1 /kernel/time/tick-sched.c | |
parent | 3d29cdff999c37b3876082278a8134a0642a02cd (diff) | |
parent | dc87c3985e9b442c60994308a96f887579addc39 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/usb/input/Makefile
drivers/usb/input/gtco.c
Diffstat (limited to 'kernel/time/tick-sched.c')
-rw-r--r-- | kernel/time/tick-sched.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 95e41f7f850b..51556b95f60f 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c | |||
@@ -21,6 +21,8 @@ | |||
21 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
22 | #include <linux/tick.h> | 22 | #include <linux/tick.h> |
23 | 23 | ||
24 | #include <asm/irq_regs.h> | ||
25 | |||
24 | #include "tick-internal.h" | 26 | #include "tick-internal.h" |
25 | 27 | ||
26 | /* | 28 | /* |
@@ -165,7 +167,9 @@ void tick_nohz_stop_sched_tick(void) | |||
165 | goto end; | 167 | goto end; |
166 | 168 | ||
167 | cpu = smp_processor_id(); | 169 | cpu = smp_processor_id(); |
168 | BUG_ON(local_softirq_pending()); | 170 | if (unlikely(local_softirq_pending())) |
171 | printk(KERN_ERR "NOHZ: local_softirq_pending %02x\n", | ||
172 | local_softirq_pending()); | ||
169 | 173 | ||
170 | now = ktime_get(); | 174 | now = ktime_get(); |
171 | /* | 175 | /* |
@@ -191,19 +195,19 @@ void tick_nohz_stop_sched_tick(void) | |||
191 | next_jiffies = get_next_timer_interrupt(last_jiffies); | 195 | next_jiffies = get_next_timer_interrupt(last_jiffies); |
192 | delta_jiffies = next_jiffies - last_jiffies; | 196 | delta_jiffies = next_jiffies - last_jiffies; |
193 | 197 | ||
198 | if (rcu_needs_cpu(cpu)) | ||
199 | delta_jiffies = 1; | ||
194 | /* | 200 | /* |
195 | * Do not stop the tick, if we are only one off | 201 | * Do not stop the tick, if we are only one off |
196 | * or if the cpu is required for rcu | 202 | * or if the cpu is required for rcu |
197 | */ | 203 | */ |
198 | if (!ts->tick_stopped && (delta_jiffies == 1 || rcu_needs_cpu(cpu))) | 204 | if (!ts->tick_stopped && delta_jiffies == 1) |
199 | goto out; | 205 | goto out; |
200 | 206 | ||
201 | /* Schedule the tick, if we are at least one jiffie off */ | 207 | /* Schedule the tick, if we are at least one jiffie off */ |
202 | if ((long)delta_jiffies >= 1) { | 208 | if ((long)delta_jiffies >= 1) { |
203 | 209 | ||
204 | if (rcu_needs_cpu(cpu)) | 210 | if (delta_jiffies > 1) |
205 | delta_jiffies = 1; | ||
206 | else | ||
207 | cpu_set(cpu, nohz_cpu_mask); | 211 | cpu_set(cpu, nohz_cpu_mask); |
208 | /* | 212 | /* |
209 | * nohz_stop_sched_tick can be called several times before | 213 | * nohz_stop_sched_tick can be called several times before |