<br><br><div class="gmail_quote">On Fri, Jan 7, 2011 at 1:19 PM, nilesh <span dir="ltr"><<a href="mailto:nilesh.tayade@netscout.com">nilesh.tayade@netscout.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On Fri, 2011-01-07 at 13:05 +0530, Rajat Sharma wrote:<br>
> As I remember timer interrupt as well is an NMI so, it is possible<br>
> (although not advised) to call schedule function while holding<br>
> spinlock on same core.<br>
><br>
> spin_lock_irqsave();<br>
> schedule();<br>
> spin_lock_irqrestore();<br>
><br>
> however if you have debugging options turned on like<br>
> CONFIG_DEBUG_SPINLOCK, you may likely get kernel warning for<br>
> 'scheduling in atomic context'.<br>
><br>
> Then what can happen if this core is allowed to switched to new<br>
> process? Consider the case where new process as well tries to aquire<br>
> same spin_lock() which new process can not aquire and start spinning<br>
> for the lock for ever :). Likewise, other cores will also get locked<br>
> down.<br>
><br>
> However stil you can detect softlockup through NMI watchdog.<br>
<br>
</div>>>Sorry if I am building up the confusion here. But as Dave Hylands<br>
>>initially mentioned, there will be no timer interrupt. So shouldn't the<br>
>>NMI watchdog get triggered then? No interrupts -> system freeze -> NMI<br>
>>Wdt reboot.<br></blockquote><div><br>In my opinion(uninformed ) NMI watchdog will be triggered only in case where you are holding a spinlock.It will not be triggered just because timer interrupts are disabled due to holding a spinlock.<br>
</div></div><br>