kdb
[Top] [All Lists]

Question about softlockup

To: Ingo Molnar <mingo@xxxxxxx>
Subject: Question about softlockup
From: jidong xiao <jidong.xiao@xxxxxxxxx>
Date: Tue, 1 Sep 2009 15:03:06 +0800
Cc: KDB <kdb@xxxxxxxxxxx>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type; bh=0XckNUuh6HZOJG3flQp40GgBy/uwpZ+Z5wLhAl0dYoE=; b=hD27tNRjojAk7AYzQkxA0w4qDoAuT7wsI+cafE6eMa1AyVNPsJz680+JnhH2HBMtIV D04Jl/5oszTo/L3TgDmeidbRSlHBrEZGovHAC08OxyLFzKD7vHJnQFxDLeFh9tOP38fC dQNDUvDRnvp9wGllnccA3jReToqLn0Hei92x8=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=hTDdPdrMACgPgnqGkOQlzAjLT5jh+oCAJbKgT1zHcXER2fXFW1WNlNbnRzigxHusYc 36taMWu19w75QfrPdpspAvYQh218O9vledmgpJ244hu1ZgW3sRWYaT4jsKQ2+X/TC3Aa VvTUuJVMvvgkWfRRqUPYYZDuFh2Fmq2qo3IQw=
Hi, Ingo,

I am looking the source code of function softlockup_tick()

    137         /* Warn about unreasonable delays: */
    138         if (now <= (touch_timestamp + softlockup_thresh))
    139                 return;
    140
    141         per_cpu(print_timestamp, this_cpu) = touch_timestamp;
    142
    143         spin_lock(&print_lock);
    144         printk(KERN_ERR "BUG: soft lockup - CPU#%d stuck for
%lus! [%s:%d]\n",
    145                         this_cpu, now - touch_timestamp,
    146                         current->comm, task_pid_nr(current));
    147         print_modules();
    148         print_irqtrace_events(current);
    149         if (regs)
    150                 show_regs(regs);
    151         else
    152                 dump_stack();
    153         spin_unlock(&print_lock);
    154
    155         if (softlockup_panic)
    156                 panic("softlockup: hung tasks");

my kernel is kdb patched kernel, and it looks like if I stay in kdb
for more than 60 seconds, I will receive a warning about softlockup
when I leave kdb. it is very annoying to see the warning message
especially in SMP environment, sometimes this could even hung the
machine. A simple way here is:

#ifdef CONFIG_KDB
 not trigger softlockup or set softlockup_thresh to be a very high value.
#elseif
 trigger softlockup if CPU stuck for more than 60 seconds
#endif

However I feel this approach is far from perfect. Do you have any
advice on how to avoid this warning?

Regards
Jason

<Prev in Thread] Current Thread [Next in Thread>