cvs commit: src/sys/netinet udp_usrreq.c

Robert Watson rwatson at
Mon Jun 30 18:26:52 UTC 2008

rwatson     2008-06-30 18:26:43 UTC

  FreeBSD src repository

  Modified files:
    sys/netinet          udp_usrreq.c 
  SVN rev 180127 on 2008-06-30 18:26:43Z by rwatson
  In udp_append() and udp_input(), make use of read locking on incpbs
  rather than write locking: while we need to maintain a valid reference
  to the inpcb and fix its state, no protocol layer state is modified
  during an IPv4 UDP receive -- there are only changes at the socket
  layer, which is separately protected by socket locking.
  While parallel concurrent receive on a single UDP socket is currently
  relatively unusual, introducing read locking in the transmit path,
  allowing concurrent receive and transmit, will significantly improve
  performance for loads such as BIND, memcached, etc.
  MFC after:      2 months
  Tested by:      gnn, kris, ps
  Revision  Changes    Path
  1.223     +8 -8      src/sys/netinet/udp_usrreq.c

More information about the cvs-src mailing list