Oliver Yang writes: > Tom Chen wrote: > > Yes, my driver is for a giga bits high speed PCI network device. I have > > been considering whether to use a soft interrupt or a separate kernel > > thread to process received packets. If gldm_intr( ) handler is already > > quite "soft" like a kernel thread, then there is no need to use a separate > > handler(soft intr or thread) to process. > > > > Thanks for your clarification! My driver can be much easier. > > > > May I ask a question, why Solaris interrupts are so different from Linux > > interrupts which forbids blocking, alloc memory etc? Is there any benefit? > > > Not only Solarisï¼but also Freebsd, both of them use interrupt threads > for low level interrupt processing. > It seems Linux also has a RT Patch which uses similar interrupt thread > mechanism.
MacOSX also uses a very similar interrupt thread mechanism. It calls it a "workloop", but it is basically an ithread wrapped in a lock which is hidden from you by lots of c++ gunk. Linux's NAPI requires drivers defer network interrupts in to be handled in a polling routine run from a softintr context which is schedule from the hardware interrupt via netif_rx_schedule. This allows you to do some things which you otherwise wouldn't be able to do in a hardware interrupt context. However, since NAPI is usually optional, most driver code has to be able to run in a hardware interrupt context, so it is hard to take advantage of. Drew _______________________________________________ networking-discuss mailing list [email protected]
