Re: Polling / Interrupt mode
Donald Becker <[email protected]> Mon, 6 May 2002 14:29:19 -0400 (EDT)
| Newsgroups | gmane.linux.drivers.3c509.devel |
|---|---|
| Message-ID | <Pine.LNX.4.33.0205061409270.2932-100000@presario> |
On Sun, 5 May 2002, Puneet Zaroo wrote: > I am new to the world of network drivers and would like your advice > before starting off on a project. > I have a 3Com vortex ethernet card and would like to use it in the > following way. Note that this is the 3c509 driver list. You should be posting to the vortex list. > The card is set up in polling mode and a kernel thread > keeps on calling the device driver polling method to read packets off > the card. But just this scenario leads to wastage of CPU cycles when no > packets are actually being transmitted . To avoid this , when the > polling method returns no packets; the card is switched back into the > interrupt mode.After the first interrupt received we switch back again > to the polling mode. Using polling mode is usually a very bad idea. The latency is horrible, and with most workloads you do more work for much lower performance. Several drivers implement a overwork-recovery scheme. When the interrupt handler can't keep up with incoming packets, the driver switches to a polling mode. This is typically driven by a timer on the NIC. But interrupts are re-enabled at the next timer tick. -- Donald Becker [email protected] Scyld Computing Corporation http://www.scyld.com 410 Severn Ave. Suite 210 Second Generation Beowulf Clusters Annapolis MD 21403 410-990-9993