Re: [announce] [patch] Voluntary Kernel Preemption Patch

Timothy Miller
2004-07-13T21:32:11Z

I have a question about voluntary kernel preemption in general.
(Shouldn't we call this "cooperative multitasking"?)

There are two disadvantages to voluntary preemption. One is that the
kernel thread my not sleep enough (high latency), and the other is that
the kernel thread may sleep too much (wasted CPU for context switch
overhead). The advantage of using the timer interrupt instead is that
the preemption happens only as often as it needs to.

My question is this: Do your reschedule points (might_sleep or whatever
you end up using) ALWAYS reschedule, or do they only reschedule after a
certain period of time (timer interrupt increments counter, and
reschedule point does nothing if it's too early)?