[lkml]   [2003]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Linux kernel preemption (kernel 2.6 of course)

On Fri, 7 Nov 2003, Oleg OREL wrote:

> I was browsing linux kernel to undetsnand how kernel preemption does
> work. I was hacking around schedulee_tick and other functions called out
> of timer interrupt and was unable to found any call to schedule() or
> switch_to() to peempt currently running task, instead just mangling
> around current and inactive runqueues.

the timer interrupt indeed cannot reschedule because interrupt contexts
must never schedule. But the timer interrupt does have the ability to
reschedule the currently running task, via setting the 'need resched'


this flag then gets detected by the entry.S 'return from interrupt' code
[right when the timer irq returns] which then calls schedule().

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:58    [W:0.038 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site