Re: RFC: use EM_LEGACY_IRQ in if_lem.c ?

From: Luigi Rizzo <rizzo_at_iet.unipi.it>
Date: Wed, 25 Jul 2012 15:57:56 +0200
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_at_freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-current
> > To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
> 
> --------------------------------------------------
> Andrew Boyer	aboyer_at_averesystems.com
> 
> 
> 
> 
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
Received on Wed Jul 25 2012 - 11:38:00 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:29 UTC