[RFC] HOWTO use NAPI to reduce TX interrupts
David Miller
davem at davemloft.net
Tue Aug 22 09:56:16 EST 2006
From: linas at austin.ibm.com (Linas Vepstas)
Date: Mon, 21 Aug 2006 18:52:44 -0500
> Under what circumstance does one turn TX interrupts back on?
> I couldn't quite figure that out.
Don't touch interrupts until both RX and TX queue work is
fullydepleted. You seem to have this notion that RX and TX interrupts
are seperate. They aren't, even if your device can generate those
events individually. Whatever interrupt you get, you shut down all
interrupt sources and schedule the ->poll(). Then ->poll() does
something like:
all_tx_completion_work();
ret = as_much_rx_work_as_budget_and_quota_allows();
if (!ret)
reenable_interrupts_and_complet_napi_poll();
You always run the TX completion work fully, then you do the RX work
within the quota/budget.
See the tg3 driver for details, really...
More information about the Linuxppc-dev
mailing list