Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 May 2006 15:10:13 +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_syscalls.c
Message-ID:  <200605251510.k4PFADhk094658@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
rwatson     2006-05-25 15:10:13 UTC

  FreeBSD src repository

  Modified files:
    sys/kern             uipc_syscalls.c 
  Log:
  Use getsock() and fput() instead of fgetsock() and fputsock() in
  sendfile().  This causes sendfile() to use the file descriptor
  reference to the socket instead of bumping the socket reference
  count, which avoids an additional refcount operation, as well as a
  potential expensive socket refcount drop, which can lead to
  contention on the accept mutex.  This change also has the side
  effect of further reducing the number of cases where an in-progress
  I/O operation can occur on a socket after close, as using the file
  descriptor refcount prevents the socket from closing while in use.
  
  MFC after:      3 months
  
  Revision  Changes    Path
  1.228     +4 -2      src/sys/kern/uipc_syscalls.c



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