Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Aug 2006 10:30:26 +0000 (UTC)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/kern uipc_sockbuf.c uipc_socket.c src/sys/sys socketvar.h
Message-ID:  <200608011030.k71AURni064758@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
rwatson     2006-08-01 10:30:26 UTC

  FreeBSD src repository

  Modified files:
    sys/kern             uipc_sockbuf.c uipc_socket.c 
    sys/sys              socketvar.h 
  Log:
  Reimplement socket buffer tear-down in sofree(): as the socket is no
  longer referenced by other threads (hence our freeing it), we don't need
  to set the can't send and can't receive flags, wake up the consumers,
  perform two levels of locking, etc.  Implement a fast-path teardown,
  sbdestroy(), which flushes and releases each socket buffer.  A manual
  dom_dispose of the receive buffer is still required explicitly to GC
  any in-flight file descriptors, etc, before flushing the buffer.
  
  This results in a 9% UP performance improvement and 16% SMP performance
  improvement on a tight loop of socket();close(); in micro-benchmarking,
  but will likely also affect CPU-bound macro-benchmark performance.
  
  Revision  Changes    Path
  1.163     +53 -13    src/sys/kern/uipc_sockbuf.c
  1.276     +22 -14    src/sys/kern/uipc_socket.c
  1.154     +1 -0      src/sys/sys/socketvar.h



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608011030.k71AURni064758>