Date: Thu, 23 Jan 2020 01:30:50 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357007 - head/sys/kern Message-ID: <202001230130.00N1Uo3w030055@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Thu Jan 23 01:30:50 2020 New Revision: 357007 URL: https://svnweb.freebsd.org/changeset/base/357007 Log: DEVICE_POLLING is an alternative to network interrupts and also needs to enter epoch. Assert that in the netisr_poll() and do the work for the idle poll routine. Modified: head/sys/kern/kern_poll.c Modified: head/sys/kern/kern_poll.c ============================================================================== --- head/sys/kern/kern_poll.c Thu Jan 23 01:27:58 2020 (r357006) +++ head/sys/kern/kern_poll.c Thu Jan 23 01:30:50 2020 (r357007) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include <sys/kernel.h> #include <sys/kthread.h> #include <sys/proc.h> +#include <sys/epoch.h> #include <sys/eventhandler.h> #include <sys/resourcevar.h> #include <sys/socket.h> /* needed by net/if.h */ @@ -332,6 +333,7 @@ hardclock_device_poll(void) static void ether_poll(int count) { + struct epoch_tracker et; int i; mtx_lock(&poll_mtx); @@ -339,8 +341,10 @@ ether_poll(int count) if (count > poll_each_burst) count = poll_each_burst; + NET_EPOCH_ENTER(et); for (i = 0 ; i < poll_handlers ; i++) pr[i].handler(pr[i].ifp, POLL_ONLY, count); + NET_EPOCH_EXIT(et); mtx_unlock(&poll_mtx); } @@ -428,6 +432,8 @@ netisr_poll(void) { int i, cycles; enum poll_cmd arg = POLL_ONLY; + + NET_EPOCH_ASSERT(); if (poll_handlers == 0) return;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001230130.00N1Uo3w030055>