svn commit: r281276 - head/sys/net

George Neville-Neil gnn at freebsd.org
Thu Apr 9 14:31:43 UTC 2015



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


More information about the svn-src-head mailing list