[3c509] Polling / Interrupt mode

Donald Becker becker@scyld.com
Mon May 6 14:31:00 2002


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				becker@scyld.com
Scyld Computing Corporation		http://www.scyld.com
410 Severn Ave. Suite 210		Second Generation Beowulf Clusters
Annapolis MD 21403			410-990-9993