From owner-freebsd-net@FreeBSD.ORG Wed May 22 21:06:41 2013 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id BF835180E for ; Wed, 22 May 2013 21:06:41 +0000 (UTC) (envelope-from havenster@gmail.com) Received: from mail-pd0-f181.google.com (mail-pd0-f181.google.com [209.85.192.181]) by mx1.freebsd.org (Postfix) with ESMTP id 9F598350 for ; Wed, 22 May 2013 21:06:41 +0000 (UTC) Received: by mail-pd0-f181.google.com with SMTP id bv13so287039pdb.12 for ; Wed, 22 May 2013 14:06:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=btR2bgMiZiBHu3MGDC0R5xDrr3vM261F5SLq4HpwrS0=; b=rrs6fZnGpelz+0n+CuWjtxVFwWWTN5ikuLoQOvyk6heBlghqC9cfemRu9Guuh56Od6 NHvkg/vPc/Npyii0pOyQwY1+ff2GuhdQcJenpicHlb3pFauPsmEfHQP/oVi1juZbOwC5 i6jIw8sAeKf4nHNpvJX9ltp4yxGV1VWFvMQEd3p31qigA8Je6eIE3tnooQQ7rfR7BgrE 5OOeGM/V+fUd5jzqnNTVMR43aeajx32Cniw5/roXt4QMU6rbMIAfgnHkPqrv7Br4cYiB 5NnsekUIFVk/YOt/dDTr5B8HrBz4ZQ5V8R0DS5zN2nucS/AKeydUpAeNIP/zWpiFguj+ U30A== MIME-Version: 1.0 X-Received: by 10.68.190.131 with SMTP id gq3mr9813260pbc.185.1369256800893; Wed, 22 May 2013 14:06:40 -0700 (PDT) Received: by 10.70.46.106 with HTTP; Wed, 22 May 2013 14:06:40 -0700 (PDT) In-Reply-To: <20130522164244.GB95808@onelab2.iet.unipi.it> References: <20130522164244.GB95808@onelab2.iet.unipi.it> Date: Wed, 22 May 2013 14:06:40 -0700 Message-ID: Subject: Re: surprise surprise (VM related) [luigi@FreeBSD.org: svn commit: r250911 - head/sys/kern] From: Haven Hash To: Luigi Rizzo Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2013 21:06:41 -0000 I notice the commentary by poll_burst_max stating it's suitability to 100Mbit net, perhaps that could use an increase in its default value as well? On Wed, May 22, 2013 at 9:42 AM, Luigi Rizzo wrote: > all that work on paravirtualization (as presented at bsdcan) > > http://info.iet.unipi.it/~luigi/netmap/talk-bsdcan-2013.html > > just to discover that simply enabling DEVICE_POLLING (10-years old > technology) gives the same performance gains plus livelock-avoidance. > > And no, linux's NAPI is nowhere near us. > > cheers > luigi > > > ----- Forwarded message from Luigi Rizzo ----- > > Date: Wed, 22 May 2013 16:32:18 +0000 (UTC) > From: Luigi Rizzo > Subject: svn commit: r250911 - head/sys/kern > To: src-committers@freebsd.org, svn-src-all@freebsd.org, > svn-src-head@freebsd.org > > 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 */ > > ----- End forwarded message ----- > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >