From owner-svn-src-all@FreeBSD.ORG Thu Apr 9 14:31:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 103FE192; Thu, 9 Apr 2015 14:31:43 +0000 (UTC) Received: from vps.hungerhost.com (vps.hungerhost.com [216.38.53.176]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9672FCF; Thu, 9 Apr 2015 14:31:42 +0000 (UTC) Received: from cpe-66-108-207-232.nyc.res.rr.com ([66.108.207.232]:50262 helo=[172.16.33.1]) by vps.hungerhost.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82) (envelope-from ) id 1YgDUb-0002Po-Cn; Thu, 09 Apr 2015 10:31:41 -0400 From: "George Neville-Neil" To: "Gleb Smirnoff" Subject: Re: svn commit: r281276 - head/sys/net Date: Thu, 09 Apr 2015 10:31:40 -0400 Message-ID: <1355AB02-F654-4129-BFDE-D3779664286A@freebsd.org> In-Reply-To: <20150408205501.GW64665@FreeBSD.org> References: <201504082025.t38KPqU0019878@svn.freebsd.org> <20150408205501.GW64665@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Mailer: MailMate (1.9.1r5084) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - freebsd.org X-Get-Message-Sender-Via: vps.hungerhost.com: authenticated_id: gnn@neville-neil.com Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2015 14:31:43 -0000 On 8 Apr 2015, at 16:55, Gleb Smirnoff wrote: > On Wed, Apr 08, 2015 at 08:25:51PM +0000, George V. Neville-Neil > wrote: > G> Author: gnn > G> Date: Wed Apr 8 20:25:51 2015 > G> New Revision: 281276 > G> URL: https://svnweb.freebsd.org/changeset/base/281276 > G> > G> Log: > G> Add support for a netisr polling tunable, which allows run time > switching of > G> device polling rather than having it only be controlled by the > compile > G> time option. > G> > G> Summary: Rubicon Communications (Netgate) > G> Reviewers: #network, hiren > G> Reviewed By: #network, hiren > G> Subscribers: hiren > G> Differential Revision: https://reviews.freebsd.org/D2258 > > You gave very short time to review it :( > > First, the sysctl namespace for device polling is kern.polling. > The polling(4) has two additional (to hardclock) modes of polling: > netisr polling and idle polling. The idle polling was always contolled > by sysctl in kern.polling namespace. Thus, the new sysctl should > reside > in this namespace. > > The second important thing is whether sysctl isn't needed at all? > What does Rubicon Communications (Netgate) need to achieve? My guess > is that they got DEVICE_POLLING in the kernel, but zero interfaces > with the IFCAP_POLLING bit set. And they don't want the poll_mtx to > be locked routinely. If my guess is true, then the patch should be > simple reverted, and in the kern/kern_poll.c, in the netisr_poll() > and netisr_pollmore() there should be put: > > if (poll_handlers == 0) > return; > > And that's all. Note that this is already done for hardclock polling. > > Accessing this value without poll_mtx held is entirely okay, since > we don't care about a race on enabling/disabling polling for NIC. > > If my guess is wrong, and Rubicon Communications (Netgate) want > to run hardclock polling, but have netisr polling disabled, then > again the patch should be reverted, and then re-applied to > kern_poll.c, > moving the netisr_polling variable there and the checks as well, > and fixing sysctl namespace. > Your guess is correct. I will revert my change and make the modification to kern_poll.c Best, George