From owner-freebsd-net@FreeBSD.ORG Tue Jul 1 03:50:25 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DD6E106568D for ; Tue, 1 Jul 2008 03:50:25 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 2799E8FC17 for ; Tue, 1 Jul 2008 03:50:22 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: by an-out-0708.google.com with SMTP id b33so388804ana.13 for ; Mon, 30 Jun 2008 20:50:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=Z+oEB9RKD3pSstDnS0x+7VVqNcbLj2ViI8GSIWXRmz8=; b=W/YKWQBGAIkWxc4th2DAl9abyAZCxquadxL0O4FFpR1TXLJPFKGFsq9R3yYBHIcIwO dzKFNWW0wIS/H8mUqxivxDz6ZwQwQSSU5p8RSwHSvvF9SsZdKgAmvzdPGpkP+dZ4CEaI bfrf9FZh7Jw9PC0UpdgstslcP+FFZCPN0XnhA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=B56qE+mfioAMMmKqn9fR+BEtD/Pp5zixIt1XGs/EZnwUW/sh8WYlQHlF1kMqx7/5vj Ekp6uGxckSTcBFJ0Rh+q6/6v8seppDQ0jaJuymgiprgXjxw8Othos/0B41FA/1Z8MRJe +PPSgqA+asiS93P8oypZv5HtyA/CA7PWgFlOI= Received: by 10.100.136.15 with SMTP id j15mr5111544and.11.1214884222342; Mon, 30 Jun 2008 20:50:22 -0700 (PDT) Received: by 10.100.107.6 with HTTP; Mon, 30 Jun 2008 20:50:22 -0700 (PDT) Message-ID: Date: Tue, 1 Jul 2008 11:50:22 +0800 From: "Sepherosa Ziehau" To: pyunyh@gmail.com In-Reply-To: <20080701033117.GH83626@cdnetworks.co.kr> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4867420D.7090406@gtcomm.net> <200806301944.m5UJifJD081781@lava.sentex.ca> <20080701004346.GA3898@stlux503.dsto.defence.gov.au> <20080701010716.GF3898@stlux503.dsto.defence.gov.au> <486986D9.3000607@monkeybrains.net> <48699960.9070100@gtcomm.net> <20080701033117.GH83626@cdnetworks.co.kr> Cc: freebsd-net@freebsd.org, "Support \(Rudy\)" , "Wilkinson, Alex" , Ingo Flaschberger , Paul Subject: Re: Freebsd IP Forwarding performance (question, and some info) [7-stable, current, em, smp] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jul 2008 03:50:25 -0000 On 7/1/08, Pyun YongHyeon wrote: > On Tue, Jul 01, 2008 at 11:05:03AM +0800, Sepherosa Ziehau wrote: > > On 7/1/08, Paul 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