Kernel code interrupted by Timer
anish kumar
anish198519851985 at gmail.com
Sun Feb 10 00:16:49 EST 2013
On Sun, 2013-02-10 at 00:47 +0800, Peter Teoh wrote:
>
>
> 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.
In the kernel folder do this:
git log --author="Frederic Weisbecker"
>
>
> --
> Regards,
> Peter Teoh
More information about the Kernelnewbies
mailing list