USB network device drivers now usable with debug.mpsafenet=1 (was:cvs commit: src/sys/dev/usb if_aue.c if_axe.c if_cue.c if_kue.c if_rue.c if_udav.c (fwd))

From: Robert Watson <rwatson_at_FreeBSD.org>
Date: Wed, 11 Aug 2004 00:27:25 -0400 (EDT)
FYI, with this change it should be substantially safer to run a Giant-free
network stack with USB network devices, despite the USB device framework
not being MPSAFE.  I have similar patches for a number of non-locked
network device drivers, including Firewire networking and older ethernet
devices, and will merge those in the next few days.

This may result in a performance hit for these devices, which may or may
not be made up for by removing the Giant lock from the network stack. 
However, it gives us some room to keep these devices operational in a
Giant-free world to allow more time for the device drivers to be made
Giant-free.

For those interested in the continuing evolution of the netperf work, a
change log can be found at:

    http://www.watson.org/~robert/freebsd/netperf/

I'll send out an updated version of my notice on using the network stack
without the Giant lock in a couple of days once I've wrapped up my current
batch of merging.

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert_at_fledge.watson.org      Principal Research Scientist, McAfee Research

---------- Forwarded message ----------
Date: Wed, 11 Aug 2004 03:38:55 +0000 (UTC)
From: Robert Watson <rwatson_at_FreeBSD.org>
To: src-committers_at_FreeBSD.org, cvs-src_at_FreeBSD.org, cvs-all_at_FreeBSD.org
Subject: cvs commit: src/sys/dev/usb if_aue.c if_axe.c if_cue.c if_kue.c         if_rue.c if_udav.c

rwatson     2004-08-11 03:38:55 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/usb          if_aue.c if_axe.c if_cue.c if_kue.c 
                         if_rue.c if_udav.c 
  Log:
  Mark USB ethernet devices as IFF_NEEDSGIANT, since the USB framework
  if_start routines cannot currently be entered without Giant.  When
  the kernel is running with debug.mpsafenet != 0, this will defer
  if_start execution to a task queue thread holding Giant, which may
  introduce additional latency, but avoid incorrect execution.
  
  Suggested by:   dfr
  
  Revision  Changes    Path
  1.86      +2 -1      src/sys/dev/usb/if_aue.c
  1.21      +2 -1      src/sys/dev/usb/if_axe.c
  1.52      +2 -1      src/sys/dev/usb/if_cue.c
  1.58      +2 -1      src/sys/dev/usb/if_kue.c
  1.16      +2 -1      src/sys/dev/usb/if_rue.c
  1.8       +2 -1      src/sys/dev/usb/if_udav.c
Received on Wed Aug 11 2004 - 02:29:00 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:05 UTC