From owner-svn-src-all@FreeBSD.ORG Wed May 22 23:55:53 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 50414430; Wed, 22 May 2013 23:55:53 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-x22d.google.com (mail-wg0-x22d.google.com [IPv6:2a00:1450:400c:c00::22d]) by mx1.freebsd.org (Postfix) with ESMTP id 6CD45AF; Wed, 22 May 2013 23:55:52 +0000 (UTC) Received: by mail-wg0-f45.google.com with SMTP id n12so1790777wgh.12 for ; Wed, 22 May 2013 16:55:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=BFX2GjhmAnGl3MsnVCwCo+MymIdgwYyKXpTL9dUWeqw=; b=KzP8jeZe+jyp/vmKxpjMleEQ2+TZktg8RaSl3Lt6pjNvgBc3cWD5TGLXbjwnJmxRkk W8TVPzQz/MJRH8Ao9YeQ8sszIICjsQH/o8vAClrPlD336JSo7RjsWAkyQ0W5kByDn8VQ VuhvEUj1bk2H/JRy3ZwVMjDUNoTB53pSYi842rvKytZiuKkCSqef2x/zyCIZ/WqhzGd8 Ezxw7O7r96NzB7bFTqXb/x2eVCbsYni+RsrYu9aCCJu8+QKTNzAmHMPHyf24YwA1noie YOnXBrx7j/TC3gOnRU0ijqVWgDEA90rBrTa3K6MEneVmpEPLEpGmmo9TiZUf2m2xX9OE c2NQ== MIME-Version: 1.0 X-Received: by 10.180.90.164 with SMTP id bx4mr38035931wib.13.1369266951615; Wed, 22 May 2013 16:55:51 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.48.74 with HTTP; Wed, 22 May 2013 16:55:51 -0700 (PDT) In-Reply-To: <201305221632.r4MGWIjK069433@svn.freebsd.org> References: <201305221632.r4MGWIjK069433@svn.freebsd.org> Date: Wed, 22 May 2013 16:55:51 -0700 X-Google-Sender-Auth: OdVVjNHdLAEeODsvP0PxnL9LaBs Message-ID: Subject: Re: svn commit: r250911 - head/sys/kern From: Adrian Chadd To: Luigi Rizzo Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2013 23:55:53 -0000 Odd, this reads like one of those things that's better off being time-capped, rather than packet-count capped. Good find, though. Adrian On 22 May 2013 09:32, Luigi Rizzo wrote: > Author: luigi > Date: Wed May 22 16:32:18 2013 > New Revision: 250911 > URL: http://svnweb.freebsd.org/changeset/base/250911 > > Log: > 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 > > Modified: > head/sys/kern/kern_poll.c > > Modified: head/sys/kern/kern_poll.c > ============================================================================== > --- head/sys/kern/kern_poll.c Wed May 22 15:15:05 2013 (r250910) > +++ head/sys/kern/kern_poll.c Wed May 22 16:32:18 2013 (r250911) > @@ -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 */