Re: interrupt moderation for if_* [was: serious networking (em) ...]

From: Jeremie Le Hen <jeremie_at_le-hen.org>
Date: Sun, 21 Nov 2004 23:44:46 +0100
> > > when thinking about this could there be some "global" way for
> > > interrupt moderation; For if_sk there is this PR:
> > > http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/41220
> > >
> > > something 'unique' to all NIC drivers would be good I guess ?
> >
> > You need NIC support for it, just like checksum offloading.  And other
> 
> good example;) We do have [-,]{rxcsum, txcsum} in ifconfig for
> turning this on/off if supported.
> 
> What I meant is to have common names for the interface (sysctl) for
> all NICs supporting this - "on grep finds all" and not to start
> home-brewed names for each driver.
> 
> There might be some different names needed because int_delay,
> int_throttle_ceil or sk_interrupt_mod might or might not achieve the
> same but if they do names should be same.

This is a great idea, it would be very user-friendly to have such a
flag in ifconfig(8) but there is a non-trivial problem to achieve this.
Although the Interrupt Moderation implementation among theses chipsets
is based on the same principle, the way we can control its behaviour
diverges very much.

 o  sk(4) cards have this feature, but according to the product white
    paper [1] and the Linux sk98lin(4) driver manual page [2], there
    are two Interrupt Moderation modes (the static one and dynamic one),
    but we may only adjust the maximum interrupts per seconds.  Note
    that, as far as I understood, both the "Moderation" and the
    "IntsPerSec" may be set at run-time.
 o  fxp(4) cards have what is called "CPU cycle saver" which also
    gathers multiple packets before generating an interrupt.  There are
    two parameters to control the behaviour of this feature : maximum
    delay and maximum number of packets to be bundled before generating
    the interrupt [3].  These parameters may be changed only by loading
    a microcode into the chip, run-time modification is impossible.
 o  em(4) have the most flexible configuration scheme for Interrupt
    Moderation, IHMO.  You may set the absolute timer and the packet
    timer as well as the interrupt throttle ceil which is the origin of
    this subthread [4].  I didn't manage to know whether these may be
    set at run-time, but I assume it's possible.

What I tried to demonstrate is that it does not seem to be possible to
find a common denominator for configurable parameters of this feature.
Furthermore it appears that some chips may be configured at run-time
while others requires uploading a microcode, it would be harm to
restrict the formers to fit with the latters capacities.

[1] http://www.syskonnect.com/syskonnect/technology/SK-NET_GE.PDF
    (see section 3.2.1)
[2] http://www.frech.ch/man/man4/sk98lin.4.html
    (see "Moderation" and "IntsPerSec" parameters)
[3] http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/fxp/if_fxpvar.h?rev=1.32&content-type=text/x-cvsweb-markup
    (see TUNABLE_INT_DELAY and TUNABLE_BUNDLE_MAX defines)
[4] http://www.intel.com/design/network/applnots/ap450.pdf

Best regards,
-- 
Jeremie Le Hen
jeremie_at_le-hen.org
Received on Sun Nov 21 2004 - 21:45:03 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:22 UTC