From owner-freebsd-current@FreeBSD.ORG Wed Jul 25 13:38:00 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20353106566C for ; Wed, 25 Jul 2012 13:38:00 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id D49578FC15 for ; Wed, 25 Jul 2012 13:37:59 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 7B3927300A; Wed, 25 Jul 2012 15:57:56 +0200 (CEST) Date: Wed, 25 Jul 2012 15:57:56 +0200 From: Luigi Rizzo To: Andrew Boyer Message-ID: <20120725135756.GB32762@onelab2.iet.unipi.it> References: <20120724202019.GA22927@onelab2.iet.unipi.it> <209163E0-F36C-4EBE-B5D5-5D538B12C95D@averesystems.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <209163E0-F36C-4EBE-B5D5-5D538B12C95D@averesystems.com> User-Agent: Mutt/1.4.2.3i Cc: current@freebsd.org Subject: Re: RFC: use EM_LEGACY_IRQ in if_lem.c ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jul 2012 13:38:00 -0000 On Wed, Jul 25, 2012 at 09:08:42AM -0400, Andrew Boyer wrote: > lem is also used under VMware. Performance and stability should be tested there, too, before this change. i do not have VMware so i cannot test it myself, but at the end of this email you can find a suitable image and instructions to test it. This said the issue of stability has nothing to do with the hypervisor (as it changes things in the guest), and regarding performance it is likely to (slightly) improve performance on all hypervisors because the legacy driver saves a couple of MMIO accesses per interrupt (and such accesses cost ~10K cycles each, even with hw support) Test case: - fetch http://info.iet.unipi.it/~luigi/netmap/20120725-netmap-picobsd-head-amd64.bin - start your favourite hypervisor, something equivalent to qemu-system-x86_64 -m 512 -hda 20120725-netmap-picobsd-head-amd64.bin - within the image login and then run dhclient em0 netsend 10.0.2.2 5678 60 0 5 cheers luigi > -Andrew > > On Jul 24, 2012, at 4:20 PM, Luigi Rizzo wrote: > > > if_lem.c ("lem", one of the e1000 drivers) has 2 possible interrupt modes: > > EM_LEGACY_IRQ uses the standard dispatch mechanism, whereas > > FAST_INTR has a custom handler that signals a taskqueue to do the job. > > > > I have no idea which actual hardware uses it (all of my Intel 1G > > cards use either "em" or "igb"), but "lem" is the driver used in > > qemu, and there the EM_LEGACY_IRQ gives approx 10% higher packet > > rates than the other. > > > > Any objections if i change the default to EM_LEGACY_IRQ ? > > > > cheers > > luigi > > _______________________________________________ > > freebsd-current@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-current > > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > > -------------------------------------------------- > Andrew Boyer aboyer@averesystems.com > > > > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"