Bottom halves are Linux's way of delaying processing. The most advantageous place for this is in an interrupt handler. In an interrupt handler, it will process no other interrupts or events of any kind, and you would like to do what you absolutely have to and delay the rest of the manipulation until later but before returning to user space. This can be done easily in Linux by creating a bottom half. The bottom halves do a great deal of work in Linux, including much of the networking receive code, all the timer handling, and much of the terminal driver. Mainly it is used to defer the processing of a kernel function.
In linux kernel there are three context of execution. One is process, interrupt and bottom-handles. System calls execute in the formers context, interrupt handler executes in the interrupt context and tasklets and soft Irqs execute under Bottom-Halve context.
Soft Irqs---- it was similar to Linux kernel 2.2 bottom halves. There is one major difference between them. SoftIrqs is a super set of bottom halves nowadays . NO 2 bottom halves execute under the same time.i.e they are serialized. Whereas a SoftIRQ is not serialized. Network processing is more benefitted with Soft Irqs rather than using the old NET_BH(bottom halve) Regards Moin
|