From owner-freebsd-net@FreeBSD.ORG Fri Mar 27 01:14:12 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 938B010656D1 for ; Fri, 27 Mar 2009 01:14:12 +0000 (UTC) (envelope-from brampton@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.25]) by mx1.freebsd.org (Postfix) with ESMTP id 25DA48FC1B for ; Fri, 27 Mar 2009 01:14:11 +0000 (UTC) (envelope-from brampton@gmail.com) Received: by ey-out-2122.google.com with SMTP id 4so169611eyf.7 for ; Thu, 26 Mar 2009 18:14:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=6+GZaxaK4mu9MpA40micQh+hB0MUxAbSQC4MIstKw4E=; b=lXl8MyiUKXZVSMcgNyEdEvMEn7++nZj5fTj66gfg4Ig9fHSRpSIcaPwn/IqLRnlZEq DNJOhRkuiVm9tCNgrCpHFJGd54TlZZINd5XnbiXRTX/QtWKl8CHSKyXdZiVZU1ylXzza 3I37byvH6YwsBcwKP5FfNuOb8QGOLzy3JLRQY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; b=ULt28sbbqueAsYJVhVHNDQUyZvIedO7YkDLhT7VR4VL3XXhYssPs6qyKTAXI8Xf+KK B49NW09HhKk53buySUdbDKd+sZCFnXELkJ+psn22GzUkxChWl8UO4gYARYTyBeoswEq6 84lL6+tZXyY/McJ+WNu/X0VrlB+0xqlpYj0Jg= MIME-Version: 1.0 Sender: brampton@gmail.com Received: by 10.210.144.8 with SMTP id r8mr362022ebd.28.1238114865492; Thu, 26 Mar 2009 17:47:45 -0700 (PDT) Date: Fri, 27 Mar 2009 00:47:45 +0000 X-Google-Sender-Auth: 75ef3675c48c3bd1 Message-ID: From: Andrew Brampton To: freebsd-net@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Interrupts + Polling mode (similar to Linux's NAPI) 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: Fri, 27 Mar 2009 01:14:13 -0000 Hi, Linux has a feature called NAPI, which amongst other things has this Interrupt initiated polling mode. Whilst the network traffic is quiet the network interfaces use interrupts, however as soon as the load becomes higher polling kicks in and stays like that until the load drops again. I know that FreeBSD can do interrupts or polling, but not together. I think that that NAPI pretty neat as it provides the benefits of both interrupts and polling, namely low CPU load (when the network is not busy), and high performance. I was wondering if anyone has considered this approach in FreeBSD? If not why not? Is there some reason why the binary FreeBSD approach is better? Or is it just that no one has dedicated the time and effort to implement this feature? Thanks Andrew