From owner-svn-src-all@FreeBSD.ORG Thu Jan 26 17:00:09 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 397511065670; Thu, 26 Jan 2012 17:00:09 +0000 (UTC) (envelope-from alc@rice.edu) Received: from mh7.mail.rice.edu (mh7.mail.rice.edu [128.42.199.46]) by mx1.freebsd.org (Postfix) with ESMTP id D8CF58FC08; Thu, 26 Jan 2012 17:00:08 +0000 (UTC) Received: from mh7.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh7.mail.rice.edu (Postfix) with ESMTP id D87EF292127; Thu, 26 Jan 2012 10:40:44 -0600 (CST) Received: from mh7.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh7.mail.rice.edu (Postfix) with ESMTP id BEF20292120; Thu, 26 Jan 2012 10:40:44 -0600 (CST) X-Virus-Scanned: by amavis-2.6.4 at mh7.mail.rice.edu, auth channel Received: from mh7.mail.rice.edu ([127.0.0.1]) by mh7.mail.rice.edu (mh7.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id 0TSlnbk0wtfe; Thu, 26 Jan 2012 10:40:44 -0600 (CST) Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh7.mail.rice.edu (Postfix) with ESMTPSA id 2B52029212E; Thu, 26 Jan 2012 10:40:44 -0600 (CST) Message-ID: <4F21820B.8040000@rice.edu> Date: Thu, 26 Jan 2012 10:40:43 -0600 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:8.0) Gecko/20111113 Thunderbird/8.0 MIME-Version: 1.0 To: Luigi Rizzo References: <201201260955.q0Q9tG1m075353@svn.freebsd.org> In-Reply-To: <201201260955.q0Q9tG1m075353@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r230572 - in head/sys/dev: ixgbe netmap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 26 Jan 2012 17:00:09 -0000 On 01/26/2012 03:55, Luigi Rizzo wrote: > Author: luigi > Date: Thu Jan 26 09:55:16 2012 > New Revision: 230572 > URL: http://svn.freebsd.org/changeset/base/230572 > > Log: > ixgbe changes: > - remove experimental code for disabling CRC > - use the correct constant for conversion between interrupt rate > and EITR values (the previous values were off by a factor of 2) > - make dev.ix.N.queueM.interrupt_rate a RW sysctl variable. > Changing individual values affects the queue immediately, > and propagates to all interfaces at the next reinit. > - add dev.ix.N.queueM.irqs rdonly sysctl, to export the actual > interrupt counts > > Netmap-related changes for ixgbe: > - use the "new" format for TX descriptors in netmap mode. > - pass interrupt mitigation delays to the user process doing poll() > on a netmap file descriptor. > On the RX side this means we will not check the ring more than once > per interrupt. This gives the process a chance to sleep and process > packets in larger batches, thus reducing CPU usage. > On the TX side we take this even further: completed transmissions are > reclaimed every half ring even if the NIC interrupts more often. > This saves even more CPU without any additional tx delays. > > Generic Netmap-related changes: > - align the netmap_kring to cache lines so that there is no false sharing > (possibly useful for multiqueue NICs and MSIX interrupts, which are > handled by different cores). It's a minor improvement but it does not > cost anything. > > Reviewed by: Jack Vogel > Approved by: Jack Vogel > > Modified: > head/sys/dev/ixgbe/ixgbe.c > head/sys/dev/netmap/ixgbe_netmap.h > head/sys/dev/netmap/netmap.c > head/sys/dev/netmap/netmap_kern.h *snip* > > Modified: head/sys/dev/netmap/netmap_kern.h > ============================================================================== > --- head/sys/dev/netmap/netmap_kern.h Thu Jan 26 09:45:14 2012 (r230571) > +++ head/sys/dev/netmap/netmap_kern.h Thu Jan 26 09:55:16 2012 (r230572) > @@ -65,13 +65,14 @@ struct netmap_kring { > struct netmap_ring *ring; > u_int nr_hwcur; > int nr_hwavail; > - u_int nr_kflags; > + u_int nr_kflags; /* private driver flags */ > +#define NKR_PENDINTR 0x1 // Pending interrupt. > u_int nkr_num_slots; > > int nkr_hwofs; /* offset between NIC and netmap ring */ > struct netmap_adapter *na; // debugging > struct selinfo si; /* poll/select wait queue */ > -}; > +} __attribute__((__aligned__(64))); The machine-dependent param.h defines CACHE_LINE_SIZE for use in situations like this. Alan