From owner-freebsd-net@FreeBSD.ORG Fri Sep 30 19:33:34 2005 Return-Path: X-Original-To: net@freebsd.org Delivered-To: freebsd-net@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3C27016A41F; Fri, 30 Sep 2005 19:33:34 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id E85AD43D48; Fri, 30 Sep 2005 19:33:33 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.12.11) with ESMTP id j8UJXXfT048897; Fri, 30 Sep 2005 12:33:33 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id j8UJXX1Z048896; Fri, 30 Sep 2005 12:33:33 -0700 (PDT) (envelope-from rizzo) Date: Fri, 30 Sep 2005 12:33:33 -0700 From: Luigi Rizzo To: Andre Oppermann Message-ID: <20050930123333.A48015@xorpc.icir.org> References: <20050930124000.GA45345@cell.sick.ru> <20050930160302.GJ45345@cell.sick.ru> <20050930181322.GB1768@garage.freebsd.pl> <20050930182325.GO45345@cell.sick.ru> <433D8417.D4666378@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <433D8417.D4666378@freebsd.org>; from andre@freebsd.org on Fri, Sep 30, 2005 at 08:29:43PM +0200 Cc: arch@freebsd.org, Pawel Jakub Dawidek , net@freebsd.org Subject: Re: [REVIEW/TEST] polling(4) changes 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, 30 Sep 2005 19:33:34 -0000 On Fri, Sep 30, 2005 at 08:29:43PM +0200, Andre Oppermann wrote: ... > > It adds a stub function call every tick. The function returns almost > > immediately if no interfaces do polling. > > If it does a FOREACH(interface) then it should stay as a kernel option. this wasn't the case when i first wrote it - the list of interfaces actually using polling was stored into an array and the count was in a variable, so the loop was something like for (i=0; i < actively_polling_interfaces; i++) foo[i]->poll() so it's basically just an extra function call per tick if no interfaces are doing polling. cheers luigi