em(4): Reduce TX interrupt rate and device's TX desc write requests
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 22 Feb 2009 09:57:22 +0000 (17:57 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 27 Feb 2009 13:49:52 +0000 (21:49 +0800)
commit9f60d74b3f53e4bb62e3dc48fe4a09f72f279045
treeaf095013c22bfa35464b98cc36c3b5021bf4e887
parent604af13b6402808597f3687d962c0efec73c2bc1
em(4): Reduce TX interrupt rate and device's TX desc write requests

The RS (report status) bit in the TX desc controls whether DD bit
should be set by device (via write request) and whether TX interrupt
should be generated.  By setting RS bit in the last TX desc of
int_tx_nsegs TX descs, we greatly reduce the TX interrupt rate
(from 20000/s to 1200/s for full speed 1472bytes UDP datagrams) and
the number of device's TX desc write requests.  This also gives me
additional +10Kpps on 82573E_IAMT.  Add sysctl node for int_tx_nsegs,
its default value is 1/16 number of TX descs.  The implementation
details are commented near struct adapter's related fields.
sys/dev/netif/em/if_em.c
sys/dev/netif/em/if_em.h