From owner-freebsd-net@FreeBSD.ORG Tue Jul 1 03:33:37 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 397E1106567C for ; Tue, 1 Jul 2008 03:33:37 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.230]) by mx1.freebsd.org (Postfix) with ESMTP id ECEC38FC1A for ; Tue, 1 Jul 2008 03:33:36 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so1951026rvf.43 for ; Mon, 30 Jun 2008 20:33:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:received:date:from :to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=0tpsrP5xDdsJ9/FXj8fjtU75eqLOZrdVOLQhuuIRAX8=; b=uhZe3q6xMVMDkf9qhyFailwf2SsGvVbDNpcSF5GXBpbaWGHHbpuz2CIbqWssj9DCpD Egj0j0n2oShZH0284JcnuQsU//Lk+yzhVQwLtbs/TLuhIDVgG9VHg2b5hJv7DGBtndq2 kxyH5BsqA7hj5zCl3aesPke078MxYIb7fawnU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=Oib6eNV2HIuoWbs4XlSSVhLSh+76utn54K8WDlrBW3uaZZZINm/Xi1+AgxrO4QJFIx SbGMYwTjZuWRdc7O/n2eFOSu9IDJDN/KqJL14xanVgy55zZhahzkEAdpZCVh3QKgGWxy Vh4rDdewAYdUQk0ZbOZTYBUxi0vJ+sutJXo4E= Received: by 10.141.5.17 with SMTP id h17mr3194316rvi.8.1214883216528; Mon, 30 Jun 2008 20:33:36 -0700 (PDT) Received: from michelle.cdnetworks.co.kr ( [211.53.35.84]) by mx.google.com with ESMTPS id b8sm8977089rvf.9.2008.06.30.20.33.33 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 30 Jun 2008 20:33:35 -0700 (PDT) Received: from michelle.cdnetworks.co.kr (localhost.cdnetworks.co.kr [127.0.0.1]) by michelle.cdnetworks.co.kr (8.13.5/8.13.5) with ESMTP id m613VQlv084406 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 1 Jul 2008 12:31:26 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id m613VI6Y084405; Tue, 1 Jul 2008 12:31:18 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Tue, 1 Jul 2008 12:31:18 +0900 From: Pyun YongHyeon To: Sepherosa Ziehau Message-ID: <20080701033117.GH83626@cdnetworks.co.kr> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i 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 Reply-To: pyunyh@gmail.com 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:33:37 -0000 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. > 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. :-( > The drawback of pure timer intr is that you waste extra cpu power, > when there is nothing to process. > > > never lock the machine anyway.. This effectively kills polling and it really > > no longer has any use except to be able to have a fraction of the cpu set > > Oh? Really? :] > > Best Regards, > sephe > > -- > Live Free or Die -- Regards, Pyun YongHyeon