Date: Tue, 14 Apr 2015 14:22:35 +0000 (UTC) From: "George V. Neville-Neil" <gnn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281528 - head/sys/kern Message-ID: <201504141422.t3EEMZRG008965@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gnn Date: Tue Apr 14 14:22:34 2015 New Revision: 281528 URL: https://svnweb.freebsd.org/changeset/base/281528 Log: When a kernel has DEVICE_POLLING turned on but no drivers have the capability do not try to take the mutex at all. Replaces misbegotten attempt from reverted commit 281276 Pointed out by: glebius Sponsored by: Rubicon Communications (Netgate) Differential Revision: https://reviews.freebsd.org/D2262 Modified: head/sys/kern/kern_poll.c Modified: head/sys/kern/kern_poll.c ============================================================================== --- head/sys/kern/kern_poll.c Tue Apr 14 14:15:14 2015 (r281527) +++ head/sys/kern/kern_poll.c Tue Apr 14 14:22:34 2015 (r281528) @@ -367,6 +367,9 @@ netisr_pollmore() struct timeval t; int kern_load; + if (poll_handlers == 0) + return; + mtx_lock(&poll_mtx); if (!netisr_pollmore_scheduled) { mtx_unlock(&poll_mtx); @@ -424,6 +427,9 @@ netisr_poll(void) int i, cycles; enum poll_cmd arg = POLL_ONLY; + if (poll_handlers == 0) + return; + mtx_lock(&poll_mtx); if (!netisr_poll_scheduled) { mtx_unlock(&poll_mtx);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504141422.t3EEMZRG008965>