Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Nov 2004 02:09:48 +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:  <200411200209.iAK29moH098869@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
rwatson     2004-11-20 02:09:48 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_5)
    sys/kern             uipc_syscalls.c 
  Log:
  Merge uipc_syscalls:1.204 from HEAD to RELENG_5:
  
    date: 2004/10/24 23:45:01;  author: rwatson;  state: Exp;  lines: +87 -23
    Move from using the socket reference count to the file reference
    count to prevent sockets from being garbage collected during
    socket-specific system calls.  This is the same approach used in
    most VFS-specific system calls, as well as generic file descriptor
    system calls such as read() and write().
  
    To do this, add a utility function getsock(), which is logically
    identical to getvnode() used for the same purpose in VFS.  Unlike
    fgetsock(), it returns with the file reference count elevated, but
    no bump of the socket reference count.  Replace matching calls to
    fputsock() with fdrop().
  
    This change is made to all socket system calls other than
    sendfile() and accept(), but the approach should be applicable to
    those system calls also.
  
    This shaves about four mutex operations off of each of these
    system calls, including send() and recv() variants, adding about
    1% to pps on minimal UDP packets for UP using netblast, and 4% on
    SMP.
  
    Reviewed by:    pjd
  
  Revision   Changes    Path
  1.200.2.2  +87 -23    src/sys/kern/uipc_syscalls.c



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