From owner-freebsd-current@FreeBSD.ORG Thu Jun 7 18:18:18 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9B81516A421 for ; Thu, 7 Jun 2007 18:18:18 +0000 (UTC) (envelope-from almarrie@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.241]) by mx1.freebsd.org (Postfix) with ESMTP id 5750613C448 for ; Thu, 7 Jun 2007 18:18:18 +0000 (UTC) (envelope-from almarrie@gmail.com) Received: by an-out-0708.google.com with SMTP id c14so151527anc for ; Thu, 07 Jun 2007 11:18:17 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; 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; b=hiKIECfPUeFnz85CJD8QggkAsSE5KPUnGIJ0+1isXdOSYnW5CCJS2SkHhUQ0bYxiGAKYsWcltlruhNRoUKDOeJ7X1VgqwwtC+FfndzjDoVQCAP214pFIBVRiyzP46cVLnc98282ijk4j5pO/mVkjC5m9hNaNrd3ln2RjRrzDPIM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=lQhDOPVZIzbtjYEBLFcowdJMQj6/sNW1yGtTczV7Y1Gi45sec865Q0Ic6N4kkvz5HqzkFUv5+dacBx31MB01uZe8uPppg/GmbIOC4JTCtg+fYzsd8BlNY0497NNIXCG2yRFEhyELf+93vY5KUl26Whmogb0563n79sRsA640dH0= Received: by 10.100.124.5 with SMTP id w5mr1211750anc.1181240296250; Thu, 07 Jun 2007 11:18:16 -0700 (PDT) Received: by 10.100.9.14 with HTTP; Thu, 7 Jun 2007 11:18:16 -0700 (PDT) Message-ID: <499c70c0706071118l6410dc5dqce32b86fd919de3@mail.gmail.com> Date: Thu, 7 Jun 2007 21:18:16 +0300 From: "Abdullah Ibn Hamad Al-Marri" To: "Chuck Swiger" In-Reply-To: <29EFA5CA-6232-45AA-A10D-0A45BB3E2100@mac.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <499c70c0706070210v39f7016hbd80e9780902e992@mail.gmail.com> <20070607093027.GA4784@heff.fud.org.nz> <499c70c0706070236x28d781e6yb8ba4c8ccd251372@mail.gmail.com> <29EFA5CA-6232-45AA-A10D-0A45BB3E2100@mac.com> Cc: freebsd-current@freebsd.org, Andrew Thompson Subject: Re: Why not remove polling(4) from 7.0? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2007 18:18:18 -0000 On 6/7/07, Chuck Swiger wrote: > On Jun 7, 2007, at 2:36 AM, Abdullah Ibn Hamad Al-Marri wrote: > >> > So why not remove it or switch to adaptive polling as em(4) > >> instead of > >> > resorting to polling? > >> > >> Are you just talking about em(4) or removing polling for all > >> drivers? It > >> is helpful in some cases, for example I run FreeBSD on a Nortel > >> contivity 1010 box where interrupts do not work on the fxp > >> interface and > >> yet its quite usable with polling mode. > >> > >> Its not enabled by default so its up to the user if they want to make > >> use of it. > > > > I mean can't we use better handeling for nics which is better than > > current polling(4)? > > If a particular NIC supports something like interrupt mitigation, > generally it will be enabled by default. Of course, using interrupt > mitigation adds latency also, just as using polling does, but the > tradeoffs are probably worth it for many cases. > > However, under other circumstances-- such as continuous or nearly > continuous high traffic loads on something like a router or firewall > application-- polling tends to handle such load better and avoid > livelock and/or excessive context switches to the interrupt handler > resulting in lower throughput. The key point to notice is that > polling is not the default behavior, it's an option which can be > selectively enabled when the admin of a particular machine decides > that it might prove to be the better choice. > > And, as Andrew mentioned, in a few cases you'll find a machine where > the NIC doesn't fire interrupts off correctly at all, generally due > to some major flaw in the hardware or BIOS config, but polling will > still work OK. > > -- > -Chuck So it's recommended to use polling if I run pf and deals with DDoS? -- Regards, -Abdullah Ibn Hamad Al-Marri Arab Portal http://www.WeArab.Net/