Re: tasklets vs. workqueues

From: George Anzinger
Date: Fri Feb 20 2004 - 19:09:05 EST


Kristian Lyngstøl wrote:
On Mon, Feb 16, 2004 at 08:20:31PM +0100, Christian Kögler wrote:

When should I use tasklets and when should I user workqueues?
What are the differences?


To quote "Linux Kernel Development" (Which I am currently reading):

Work queues defer work into a kernel thread-the work always runs in process
context. Most importantly, work queues are schedulable and can therefore sleep.

Normally, there is little decision between work queues or sotftirqs/tasklets.
If the deferred work need to sleep, work queues are used. If the deferred work need not sleepa, softirqs or tasklets are used.

Being in process context, you can also change the priority and schedule policy as needed to fit your application, while you are rather stuck with tasklets in this regard.


--
George Anzinger george@xxxxxxxxxx
High-res-timers: http://sourceforge.net/projects/high-res-timers/
Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/