Date: Sat, 9 Jan 2010 00:20:33 +0000 (UTC) From: Pyun YongHyeon <yongari@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/dev/vge if_vge.c if_vgereg.h if_vgevar.h Message-ID: <201001090020.o090KlaI050428@repoman.freebsd.org>
index | next in thread | raw e-mail
yongari 2010-01-09 00:20:33 UTC
FreeBSD src repository
Modified files: (Branch: RELENG_7)
sys/dev/vge if_vge.c if_vgereg.h if_vgevar.h
Log:
SVN rev 201869 on 2010-01-09 00:20:33Z by yongari
MFC r200638:
Implement interrupt moderation scheme supported by VT61xx
controllers. TX/RX interrupt mitigation is controlled by
VGE_TXSUPPTHR and VGE_RXSUPPTHR register. These registers suppress
generation of interrupts until the programmed frames counter equals
to the registers. VT61xx also supports interrupt hold off timer
register. If this interrupt hold off timer is active all interrupts
would be disabled until the timer reaches to 0. The timer value is
reloaded whenever VGE_ISR register written. The timer resolution is
about 20us.
Previously vge(4) used single shot timer to reduce Tx completion
interrupts. This required VGE_CRS1 register access in Tx
start/completion handler to rearm new timeout value and it did not
show satisfactory result(more than 50k interrupts under load). Rx
interrupts was not moderated at all such that vge(4) used to
generate too many interrupts which in turn made polling(4) better
approach under high network load.
This change activates all interrupt moderation mechanism and
initial values were tuned to generate interrupt less than 8k per
second. That number of interrupts wouldn't add additional packet
latencies compared to polling(4). These interrupt parameters could
be changed with sysctl.
dev.vge.%d.int_holdoff
dev.vge.%d.rx_coal_pkt
dev.vge.%d.tx_coal_pkt
Interface has be brought down and up again before change take
effect.
With interrupt moderation there is no more need to loop in
interrupt handler. This loop always added one more register access.
While I'm here remove dead code which tried to implement subset of
interrupt moderation.
Revision Changes Path
1.31.2.11 +85 -78 src/sys/dev/vge/if_vge.c
1.2.10.4 +1 -2 src/sys/dev/vge/if_vgereg.h
1.4.10.7 +17 -0 src/sys/dev/vge/if_vgevar.h
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001090020.o090KlaI050428>
