Tasklet, taskqueue, work-queue - what to use?

I have been going through ldd3 in the last few months. Several times I read several chapters.

These two links use different methods, one uses a work queue, the other uses a queue task. To realize the lower half.
http://www.tldp.org/LDP/lkmpg/2.4/html/x1210.html http://www.linuxtopia.org/online_books/linux_kernel/linux_kernel_module_programming_2.6/x1256.html

I have some doubts regarding tasklet, taskqueue, work-queue, everyone seems to perform some task in their free time: -

a) What is the difference between the three?

b) What should be used for the lower half of the interrupt handler?

confused ... ???

+5
source share
2 answers

The task and work queue are usually used in the lower half, but they can be used anywhere, they are not for them.

Regarding the difference.

1) Tasklet is used in the context of an interrupt. All tasklet code must be atomic, so all the rules that apply to the atomic context apply to it. E.g. They cannot sleep (since they cannot be undone) or hold the lock for a long time.

2) Unlike Task-queue, the execution queue is executed, this means that they can sleep and hold the lock for a long time.

The short chain is used for quick execution, since they cannot sleep when working words are used as normal execution of the lower half. Both of them are executed in the future using the kernel.

+3
source

Softirq tasklet - , , . , ( .)

, , , .

. nw, HW HW , - , - softirq tasklets.

. Linux . 8. LDD, Linux Kernel Development Robert Love , .

+1

All Articles