Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Jul 2008 11:50:22 +0800
From:      "Sepherosa Ziehau" <sepherosa@gmail.com>
To:        pyunyh@gmail.com
Cc:        freebsd-net@freebsd.org, "Support \(Rudy\)" <crapsh@monkeybrains.net>, "Wilkinson, Alex" <alex.wilkinson@dsto.defence.gov.au>, Ingo Flaschberger <if@xip.at>, Paul <paul@gtcomm.net>
Subject:   Re: Freebsd IP Forwarding performance (question, and some info) [7-stable, current, em, smp]
Message-ID:  <ea7b9c170806302050p2a3a5480t29923a4ac2d7c852@mail.gmail.com>
In-Reply-To: <20080701033117.GH83626@cdnetworks.co.kr>
References:  <4867420D.7090406@gtcomm.net> <200806301944.m5UJifJD081781@lava.sentex.ca> <20080701004346.GA3898@stlux503.dsto.defence.gov.au> <alpine.LFD.1.10.0807010257570.19444@filebunker.xip.at> <20080701010716.GF3898@stlux503.dsto.defence.gov.au> <alpine.LFD.1.10.0807010308320.19444@filebunker.xip.at> <486986D9.3000607@monkeybrains.net> <48699960.9070100@gtcomm.net> <ea7b9c170806302005n2a66f592h2127f87a0ba2c6d2@mail.gmail.com> <20080701033117.GH83626@cdnetworks.co.kr>

next in thread | previous in thread | raw e-mail | index | archive | help
On 7/1/08, Pyun YongHyeon <pyunyh@gmail.com> wrote:
> On Tue, Jul 01, 2008 at 11:05:03AM +0800, Sepherosa Ziehau wrote:
>   > On 7/1/08, Paul <paul@gtcomm.net> wrote:
>   > > All the NIC drivers in 7 pretty much use interrupt moderation so it can
>   >
>   > I am not quite sure whether em(4)'s RX interrupt moderation works as
>   > expected or not.  But, AFAIK, nfe(4) and re(4) does not have RX
>   > interrupt moderation.  Their TX interrupt moderation could be mimiced
>   > by using their hardware timer and disabling their TX interrupt.
>   >
>   > The lacking of RX im is difficult to handle, I could imagine following way:
>   > - During init, enable RX intr
>   > - When RX intr comes, disable RX intr and set up hardware timer intr
>   > - When timer intr comes and no RX happens, disable timer intr and enable RX intr
>   >
>
>
> I guess adaptive polling would give the same effect withtout
>  sacrificing CPU cycles.

The possible wasting is one extra timer intr if there is nothing to
processing at all.  But would it be counted as wasting, if the system
was that idle? :)

We will see the result, when I could find some free time to implement it :]

>
>
>   > Properly configured #RX desc and timer intr interval will be required
>   > to make sure that the RX desc collection could keep up with the
>   > hardware speed.  I used pure timer intr (8000Hz) on nfe(4) in dfly w/
>   > good result, i.e. TX/RX @linespeed without livelocking the system.
>
>
> I thought that too for a while but I prefer to hardware intertrrupt
>  moderation feature. Of course I still have no clue how to enable
>  that interrupt feature on nvidia controllers. :-(

RX/TX intr is not affected at all by the so called IMTIMER register.
The IMTIMER register is actually only a hardware timer counter
register.  I took a look at Linux's forcedeth several days ago, but I
didn't see anything improved in that area.

Best Regards,
sephe

-- 
Live Free or Die



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