Messages in this thread | | | Date | Thu, 19 Feb 2004 14:44:57 -0800 | From | George Anzinger <> | Subject | Re: tasklets vs. workqueues |
| |
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@mvista.com 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |