Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Nov 2004 23:44:46 +0100
From:      Jeremie Le Hen <jeremie@le-hen.org>
To:        "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
Cc:        Shunsuke SHINOMIYA <shino@fornext.org>
Subject:    Re: interrupt moderation for if_* [was: serious networking (em) ...]
Message-ID:  <20041121224446.GT69710@obiwan.tataz.chchile.org>
In-Reply-To: <Pine.BSF.4.53.0411211246540.42526@e0-0.zab2.int.zabbadoz.net>
References:  <20041119114233.C43B.SHINO@fornext.org> <20041119185315.C43D.SHINO@fornext.org> <20041119120102.GM69710@obiwan.tataz.chchile.org> <Pine.BSF.4.53.0411201049100.42526@e0-0.zab2.int.zabbadoz.net> <20041121020050.GB94473@dan.emsphone.com> <Pine.BSF.4.53.0411211246540.42526@e0-0.zab2.int.zabbadoz.net>

next in thread | previous in thread | raw e-mail | index | archive | help
> > > 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@le-hen.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041121224446.GT69710>