|
发表于 2007-6-24 20:55:42
|
显示全部楼层
void softlockup_tick(void)
{
int this_cpu = smp_processor_id();
unsigned long touch_timestamp = per_cpu(touch_timestamp, this_cpu);
/* prevent double reports: */
if (per_cpu(print_timestamp, this_cpu) == touch_timestamp ||
did_panic ||
!per_cpu(watchdog_task, this_cpu))
return;
/* do not print during early bootup: */
if (unlikely(system_state != SYSTEM_RUNNING)) {
touch_softlockup_watchdog();
return;
}
/* Wake up the high-prio watchdog task every second: */
if (time_after(jiffies, touch_timestamp + HZ))
wake_up_process(per_cpu(watchdog_task, this_cpu));
/* Warn about unreasonable 10+ seconds delays: */
if (time_after(jiffies, touch_timestamp + 10*HZ)) {
per_cpu(print_timestamp, this_cpu) = touch_timestamp;
spin_lock(&print_lock);
printk(KERN_ERR "BUG: soft lockup detected on CPU#%d!\n",
this_cpu);
dump_stack();
spin_unlock(&print_lock);
}
} |
|