<br><br><div class="gmail_quote">On Sun, Feb 10, 2013 at 12:22 AM, Frederic Weisbecker <span dir="ltr"><<a href="mailto:fweisbec@gmail.com" target="_blank">fweisbec@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2013/2/9 Peter Teoh <<a href="mailto:htmldeveloper@gmail.com">htmldeveloper@gmail.com</a>>:<br>
<div class="im">> A search in the entire subtree of arch/x86/ and including all its<br>
> subdirectories, (for 3.2.0 kernel) return only TWO result where<br>
> preempt_schedule_irq is called: kernel/entry_64.S and kernel/entry_32.S.<br>
> And the called is in fact resume_kernel(), ie, it is NOT called from timer<br>
> interrupt, but from wakeup context of the CPU, and is only executed ONCE<br>
> upon waking up from hibernation.<br>
><br>
> for example, calling from here:<br>
><br>
> <a href="https://lkml.org/lkml/2012/5/2/298" target="_blank">https://lkml.org/lkml/2012/5/2/298</a><br>
><br>
> so definitely this preempt_schedule_irq() calling from irq mode is rare - at<br>
> least for x86.<br>
<br>
</div>The name "resume_kernel" can indeed sound like something that is<br>
called on hibernation resume. It's actually not related at all. It's a<br>
piece of code that is called at the end of every irq and exception<br>
when the interrupted code was running in the kernel. If the<br>
interrupted code was running in userspace, we jump to<br>
resume_userspace.<br>
</blockquote></div><br>well, i guessed u must be the expert here, i have yet to really digest all these...:-). thanks for the explanation.<br clear="all"><div><br></div>-- <br>Regards,<br>Peter Teoh