October 2017
Intermediate to advanced
586 pages
14h 8m
English
Unless you have no choice, you need critical performance, or you need to control everything from work queue initialization to work scheduling, and if you only submit tasks occasionally, you should use the shared work queue provided by the kernel. With that queue being shared over the system, you should be nice, and should not monopolize the queue for a long time.
Since the execution of the pending task on the queue is serialized on each CPU, you should not sleep for a long time because no other task on the queue will run until you wake up. You won't even know who you share the work queue with, so don't be surprised if your task takes longer to get the CPU. Work in shared work queues is executed ...