From owner-freebsd-net@FreeBSD.ORG Tue Apr 28 18:40:13 2009 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 2AC291065672 for ; Tue, 28 Apr 2009 18:40:13 +0000 (UTC) (envelope-from barney_cordoba@yahoo.com) Received: from web63904.mail.re1.yahoo.com (web63904.mail.re1.yahoo.com [69.147.97.119]) by mx1.freebsd.org (Postfix) with SMTP id C8DF18FC1B for ; Tue, 28 Apr 2009 18:40:12 +0000 (UTC) (envelope-from barney_cordoba@yahoo.com) Received: (qmail 80595 invoked by uid 60001); 28 Apr 2009 18:40:12 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1240944012; bh=Y3BMRXql6likJrhhDFSZqztYLA34kzYiC9yMXVeifYw=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=xuXhW9tDq6qMlgqJ3fot89a//EDtKSA0AwYMiepEQeJ+uiupnUeBgqE327XEZ+r1mnFTB7LMSVqIiLnqw3sn9nrkNwlYtodwAnXqH6hsLRxx2d8DVo/7GDUzSBB+vASzFn5FXZl4ujNpVfKY9GOBk5OchC9FaW543Xmk3YGGdcI= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=u0lIzBZJ+WBCdKWmdPtOlN0K4+fbMBi9OVmTFE8zYCs8uzWQaTiH9IxGxNYq5ff0LOzSw2ZpgKhp/nba/f4dJtpTo5phM1J6woO7NpdPzkV+bFAhbGn7BFXUNczy+fGDUJNUCdH7jpvmytk0Hadb08hNWnizyelPDgVBnJ6YxvI=; Message-ID: <230101.78323.qm@web63904.mail.re1.yahoo.com> X-YMail-OSG: QcbwtiMVM1mGCaauMTZUE96zwMPFWbvBWiB7tUs8Q2R_huHYUxdr3KAGeSJnDl_MMZySDV7FT5Cq3kOrl64yPiR7fSqCXT4Ud7TvLbNN1XkBAbvg3J6UUSwLjD.hzASLBLDEAMVMGjhAxGAiX_u4f..QMX05SC5eTbiFQo0ZHVy69dCmKqHFTUW2vWO6YHnEHS7sW4o6BD9y0W.mP6s8upKU5dF9MhTE0p5_n7IjUv2V1maO.OXc.hZw47foFxeP.euZbhy.GFwm7uP7UqGmbmxbGQAtqqnCwbrqvzREUokDEbFhDNvnrcsDiiYm2a5Z2OORjxxPUm.n5Xc3Oi4- Received: from [98.242.223.106] by web63904.mail.re1.yahoo.com via HTTP; Tue, 28 Apr 2009 11:40:12 PDT X-Mailer: YahooMailWebService/0.7.289.1 Date: Tue, 28 Apr 2009 11:40:12 -0700 (PDT) From: Barney Cordoba To: Luigi Rizzo In-Reply-To: <20090428150739.GC8430@onelab2.iet.unipi.it> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: FreeBSD Net , fabient@freebsd.org Subject: Re: Interrupts + Polling mode (similar to Linux's NAPI) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: barney_cordoba@yahoo.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2009 18:40:13 -0000 --- On Tue, 4/28/09, Luigi Rizzo wrote: > From: Luigi Rizzo > Subject: Re: Interrupts + Polling mode (similar to Linux's NAPI) > To: "Barney Cordoba" > Cc: "Paolo Pisati" , fabient@freebsd.org, "FreeBSD Net" > Date: Tuesday, April 28, 2009, 11:07 AM > On Tue, Apr 28, 2009 at 07:26:40AM -0700, Barney Cordoba > wrote: > ... > > The problem with all of this "analysis" is > that it assumes that SMP > > coding scales intuitively; when the opposite is > actually true. > > > > What you fail to address is the basic fact that > moderated interrupts > > (ie holding off interrupts to a set number of > ints/second) is exactly > > the same as polling, as on an active system you'll > get exactly X > > interrupts per second at equal intervals. So all of > this chatter about > > polling being more efficient is simply bunk. > > > > The truth is that polling requires additional overhead > to the system while > > interrupts do not. So if polling did better for you, > its simply because > > either > > > > 1) The polling code in the driver is better > > > > or > > > > 2) You tuned polling better than you tuned interrupt > moderation. > > > > If i am not mistaken we don't have generic support for > interrupt moderation > in the kernel but that's a specific NIC feature: it > works if the > hardware supports it, and it doesn't otherwise. Well its the silly integrator who uses whatever hardware he has lying around. You don't try to squeeze performance out of crap hardware. You get hardware that has the features you need. The point of polling was to avoid livelock. So the question is why is it still around in 7 and 8, along with the propaganda that its any better than just using a decent controller. BC