aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_poll.c
diff options
context:
space:
mode:
authorLuigi Rizzo <luigi@FreeBSD.org>2013-05-22 16:32:18 +0000
committerLuigi Rizzo <luigi@FreeBSD.org>2013-05-22 16:32:18 +0000
commit4b62214f4ad1fc244228401281b66733bd11912b (patch)
tree72d8722463c8a7c5fa40bdf416fcb532bd3b797f /sys/kern/kern_poll.c
parent83b375ea169d517923e6050d8f922f8960014ca7 (diff)
downloadsrc-4b62214f4ad1fc244228401281b66733bd11912b.tar.gz
src-4b62214f4ad1fc244228401281b66733bd11912b.zip
Increase the (arbitrary) limit for the number of packets per tick
from 1k to 20k The previous value was good 10 years ago, but not anymore now. More importantly, lots of good surprises: polling is incredibly effective under virtualization, and not only prevents livelock but also saves most of the VM exit overhead in receive mode. Using polling, a FreeBSD instance under qemu-kvm remains perfectly responsive even when bombed with 10 Mpps over an emulated e1000, and happily processes 1.7 Mpps through ipfw. Note that some incompatibilities still remain: e.g. polling is not (yet) compatible with netmap, and seems to freeze the guest when kern.polling.idle_poll=1 MFC after: 3 days
Notes
Notes: svn path=/head/; revision=250911
Diffstat (limited to 'sys/kern/kern_poll.c')
-rw-r--r--sys/kern/kern_poll.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/kern_poll.c b/sys/kern/kern_poll.c
index 00104521ab77..a79161ece5cb 100644
--- a/sys/kern/kern_poll.c
+++ b/sys/kern/kern_poll.c
@@ -87,12 +87,11 @@ static struct mtx poll_mtx;
* The following constraints hold
*
* 1 <= poll_each_burst <= poll_burst <= poll_burst_max
- * 0 <= poll_each_burst
* MIN_POLL_BURST_MAX <= poll_burst_max <= MAX_POLL_BURST_MAX
*/
#define MIN_POLL_BURST_MAX 10
-#define MAX_POLL_BURST_MAX 1000
+#define MAX_POLL_BURST_MAX 20000
static uint32_t poll_burst = 5;
static uint32_t poll_burst_max = 150; /* good for 100Mbit net and HZ=1000 */