Kernel code interrupted by Timer

Peter Teoh htmldeveloper at gmail.com
Sat Feb 9 11:47:05 EST 2013


On Sun, Feb 10, 2013 at 12:22 AM, Frederic Weisbecker <fweisbec at gmail.com>wrote:

> 2013/2/9 Peter Teoh <htmldeveloper at gmail.com>:
> > A search in the entire subtree of arch/x86/ and including all its
> > subdirectories, (for 3.2.0 kernel) return only TWO result where
> > preempt_schedule_irq is called:   kernel/entry_64.S and
> kernel/entry_32.S.
> > And the called is in fact resume_kernel(),   ie, it is NOT called from
> timer
> > interrupt, but from wakeup context of the CPU, and is only executed ONCE
> > upon waking up from hibernation.
> >
> > for example, calling from here:
> >
> > https://lkml.org/lkml/2012/5/2/298
> >
> > so definitely this preempt_schedule_irq() calling from irq mode is rare
> - at
> > least for x86.
>
> The name "resume_kernel" can indeed sound like something that is
> called on hibernation resume. It's actually not related at all. It's a
> piece of code that is called at the end of every irq and exception
> when the interrupted code was running in the kernel. If the
> interrupted code was running in userspace, we jump to
> resume_userspace.
>

well, i guessed u must be the expert here, i have yet to really digest all
these...:-).   thanks for the explanation.

-- 
Regards,
Peter Teoh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130210/53e412a2/attachment-0001.html 


More information about the Kernelnewbies mailing list