FreeBSD/src 4510025 (r344253)sys/dev/netmap netmap_freebsd.c netmap_kern.h

netmap: don't schedule kqueue notify task when kqueue is not used

This change adds a counter (kqueue_users) to keep track of how many
kqueue users are referencing a given struct nm_selinfo.
In this way, nm_os_selwakeup() can schedule the kevent notification
task only when kqueue is actually being used.
This is important to avoid wasting CPU in the common case where
kqueue is not used.

Reviewed by:    Aleksandr Fedorov <aleksandr.fedorov at itglobal.com>
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D19177
DeltaFile
+22-7sys/dev/netmap/netmap_freebsd.c
+3-0sys/dev/netmap/netmap_kern.h
+25-72 files

UnifiedSplitRaw