source:
trunk/packages/xen-3.1/xen-3.1/patches/linux-2.6.18/softlockup-no-idle-hz.patch
@
34
Last change on this file since 34 was 34, checked in by hartmans, 18 years ago | |
---|---|
|
|
File size: 2.0 KB |
-
include/linux/sched.h
diff -pruN ../orig-linux-2.6.18/include/linux/sched.h ./include/linux/sched.h
old new extern void update_process_times(int use 211 211 extern void scheduler_tick(void); 212 212 213 213 #ifdef CONFIG_DETECT_SOFTLOCKUP 214 extern unsigned long softlockup_get_next_event(void); 214 215 extern void softlockup_tick(void); 215 216 extern void spawn_softlockup_task(void); 216 217 extern void touch_softlockup_watchdog(void); 217 218 #else 219 static inline unsigned long softlockup_get_next_event(void) 220 { 221 return MAX_JIFFY_OFFSET; 222 } 218 223 static inline void softlockup_tick(void) 219 224 { 220 225 } -
kernel/softlockup.c
diff -pruN ../orig-linux-2.6.18/kernel/softlockup.c ./kernel/softlockup.c
old new void touch_softlockup_watchdog(void) 40 40 } 41 41 EXPORT_SYMBOL(touch_softlockup_watchdog); 42 42 43 unsigned long softlockup_get_next_event(void) 44 { 45 int this_cpu = smp_processor_id(); 46 unsigned long touch_timestamp = per_cpu(touch_timestamp, this_cpu); 47 48 if (per_cpu(print_timestamp, this_cpu) == touch_timestamp || 49 did_panic || 50 !per_cpu(watchdog_task, this_cpu)) 51 return MAX_JIFFY_OFFSET; 52 53 return max_t(long, 0, touch_timestamp + HZ - jiffies); 54 } 55 43 56 /* 44 57 * This callback runs from the timer interrupt, and checks 45 58 * whether the watchdog thread has hung or not: -
kernel/timer.c
diff -pruN ../orig-linux-2.6.18/kernel/timer.c ./kernel/timer.c
old new unsigned long next_timer_interrupt(void) 485 485 if (hr_expires < 3) 486 486 return hr_expires + jiffies; 487 487 } 488 hr_expires += jiffies; 488 hr_expires = min_t(unsigned long, 489 softlockup_get_next_event(), 490 hr_expires) + jiffies; 489 491 490 492 base = __get_cpu_var(tvec_bases); 491 493 spin_lock(&base->lock);
Note: See TracBrowser
for help on using the repository browser.