A classic paper by Matthew Wilcox: I'll Do It Later: Softirqs, Tasklets, Bottom Halves, Task Queues, Work Queues and Timers http://www.wil.cx/matthew/lca2003/paper.pdf Within it described all the decisions needed. On Mon, May 19, 2008 at 4:45 PM, Peter Teoh <htmldeveloper@xxxxxxxxx> wrote: > proper comparison should be tasklet vs workqueue. this is because > kernel thread creation has a "do_fork()" that will load the executable > image into memory .... resource intensive...but what u do is to create > workqueue...which will submit its work to a running kernel thread to > be executed instead....no repeated creation of kernel thread. > > by design, tasklet is bottom-half in its characteristics - cannot be > delayed, no switching of CPU, no sleep function, all the time critical > stuff etc. but workqueue will be scheduled when CPU is busy etc. > > But if u want to compare tasklet and workqueue here is a good writeup summary: > > http://www.gossamer-threads.com/lists/linux/kernel/419651?search_string=%26quot%3Btasklets%20vs.%20workqueues%26quot%3B;#419651 > > Key message quoted here: > > 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 sleep, softirqs or tasklets are used. > > On Mon, May 19, 2008 at 2:08 PM, Lal <learner.kernel@xxxxxxxxx> wrote: >> Which one is faster between a tasklet and kernel thread in terms of >> scheduling (i.e. who will be scheduled first?) >> >> -Lal > > -- > Regards, > Peter Teoh > -- Regards, Peter Teoh -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ