On Fri, Aug 14, 2009 at 11:25 AM, Mulyadi Santosa<mulyadi.santosa@xxxxxxxxx> wrote: > On Fri, Aug 14, 2009 at 12:15 PM, Michael > Blizek<michi1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote: >> Hi! >> >> On 00:08 Fri 14 Aug , Mohammed Gamal wrote: >> >> ... >> >>> As far as I understood, Michi's answer explains why and when the >>> kernel *can* get preempted, however what I really want to know is when >>> and where kernel preemption is *triggered*. Please correct me if I did >>> misunderstand anything. >> >> It is triggered by the timer interrupt. This is an interrupt which fires >> periodically on configureable intervals. It does not only preempt the kernel, >> but user space processes as well. If it fires, the kernel will enter the >> scheduler and decide what to run next. > > In addition, IIRC: > - every return from hard interrupt, either back to kernel space (if > kernel level preemption is enabled) or to user space triggers > preemption checking. > > - going back from kernel space to user space triggers preemption checking. > > > -- > regards, > > Mulyadi Santosa > Freelance Linux trainer > blog: the-hydra.blogspot.com > Thanks guys, Any pointers to where this is done in the kernel source? I'm a little bit lost there. Regards, Mohammed -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ