What’s different between deferrable functions and work queues
2013-05-14 10:51
465 查看
Tasklets and work queues implement deferrable functionality and replace the older bottom-half mechanism for drivers.
The BH interface is ancient, and it showed. Each BH must be statically defined, and
there are a maximum of 32. Because the handlers must all be defined at compile-time,
modules could not directly use the BH interface.They could piggyback off an existing
BH, however. Over time, this static requirement and the maximum of 32 bottom halves
became a major hindrance to their use.
All BH handlers are strictly serialized—no two BH handlers, even of different types,
can run concurrently.This made synchronization easy, but it wasn’t beneficial to multi-
processor scalability. Performance on large SMP machines was sub par.A driver using the
BH interface did not scale well to multiple processors.The networking layer, in particular,
suffered.
Work queues are a different form of deferring work from what we have looked at so far.
Work queues defer work into a kernel thread—this bottom half always runs in process
context.Thus, code deferred to a work queue has all the usual benefits of process context.
Most important, work queues are schedulable and can therefore sleep.
The BH interface is ancient, and it showed. Each BH must be statically defined, and
there are a maximum of 32. Because the handlers must all be defined at compile-time,
modules could not directly use the BH interface.They could piggyback off an existing
BH, however. Over time, this static requirement and the maximum of 32 bottom halves
became a major hindrance to their use.
All BH handlers are strictly serialized—no two BH handlers, even of different types,
can run concurrently.This made synchronization easy, but it wasn’t beneficial to multi-
processor scalability. Performance on large SMP machines was sub par.A driver using the
BH interface did not scale well to multiple processors.The networking layer, in particular,
suffered.
Work queues are a different form of deferring work from what we have looked at so far.
Work queues defer work into a kernel thread—this bottom half always runs in process
context.Thus, code deferred to a work queue has all the usual benefits of process context.
Most important, work queues are schedulable and can therefore sleep.
相关文章推荐
- What are the Differences between Work Package and Planning Package?
- What's different between INDEX and KEY in database
- what's the different between forward proxy and reverse proxy?
- What is the different between Byte and bit
- What is different between PCI-Express and PCI ?
- What is different between ClassLoader.getResourceAsStream() and Class.getResourceAsStream()?
- What is the different between a Cluster and MPP supercomputer architecture?
- what is the different between function and method in python
- Item 5: Know what functions C++ silently writes and calls(Effective C++)
- What are the difference between DDL, DML and DCL commands?
- Effective C#之20:Distinguish Between Implementing Interfaces and Overriding Virtual Functions
- What is the difference between test, [ and [[ ?
- Java theory and practice: Thread pools and work queues
- What is the difference between data mining and machine learning?
- What is the difference between a pack slip and a pick slip?
- What's the difference between “local” and “my” in Perl
- What is the difference between Web Farm and Web Garden?
- What’s the difference between an interface and an abstract class in Java?
- What is the difference between concurrency, parallelism and asynchronous methods?
- what is the difference between little-endian and big-endian.