Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Jun 2004 18:16:22 +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/sys socketvar.h src/sys/kern sys_socket.c uipc_socket.c uipc_socket2.c uipc_syscalls.c uipc_usrreq.c src/sys/fs/fifofs fifo_vnops.c src/sys/netatm atm_aal5.c...
Message-ID:  <200406141816.i5EIGM7h075223@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
rwatson     2004-06-14 18:16:22 UTC

  FreeBSD src repository

  Modified files:
    sys/sys              socketvar.h 
    sys/kern             sys_socket.c uipc_socket.c uipc_socket2.c 
                         uipc_syscalls.c uipc_usrreq.c 
    sys/fs/fifofs        fifo_vnops.c 
    sys/netatm           atm_aal5.c 
    sys/netgraph         ng_ksocket.c 
    sys/netgraph/bluetooth/socket ng_btsocket_rfcomm.c 
    sys/netinet          accf_http.c tcp_input.c tcp_usrreq.c 
    sys/netipx           spx_usrreq.c 
    sys/netsmb           smb_trantcp.c 
  Log:
  The socket field so_state is used to hold a variety of socket related
  flags relating to several aspects of socket functionality.  This change
  breaks out several bits relating to send and receive operation into a
  new per-socket buffer field, sb_state, in order to facilitate locking.
  This is required because, in order to provide more granular locking of
  sockets, different state fields have different locking properties.  The
  following fields are moved to sb_state:
  
    SS_CANTRCVMORE            (so_state)
    SS_CANTSENDMORE           (so_state)
    SS_RCVATMARK              (so_state)
  
  Rename respectively to:
  
    SBS_CANTRCVMORE           (so_rcv.sb_state)
    SBS_CANTSENDMORE          (so_snd.sb_state)
    SBS_RCVATMARK             (so_rcv.sb_state)
  
  This facilitates locking by isolating fields to be located with other
  identically locked fields, and permits greater granularity in socket
  locking by avoiding storing fields with different locking semantics in
  the same short (avoiding locking conflicts).  In the future, we may
  wish to coallesce sb_state and sb_flags; for the time being I leave
  them separate and there is no additional memory overhead due to the
  packing/alignment of shorts in the socket buffer structure.
  
  Revision  Changes    Path
  1.96      +5 -5      src/sys/fs/fifofs/fifo_vnops.c
  1.59      +4 -4      src/sys/kern/sys_socket.c
  1.178     +10 -10    src/sys/kern/uipc_socket.c
  1.130     +8 -4      src/sys/kern/uipc_socket2.c
  1.193     +4 -4      src/sys/kern/uipc_syscalls.c
  1.125     +1 -1      src/sys/kern/uipc_usrreq.c
  1.19      +1 -1      src/sys/netatm/atm_aal5.c
  1.10      +2 -2      src/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c
  1.44      +2 -2      src/sys/netgraph/ng_ksocket.c
  1.15      +3 -3      src/sys/netinet/accf_http.c
  1.239     +5 -5      src/sys/netinet/tcp_input.c
  1.101     +2 -2      src/sys/netinet/tcp_usrreq.c
  1.42      +3 -3      src/sys/netipx/spx_usrreq.c
  1.20      +2 -2      src/sys/netsmb/smb_trantcp.c
  1.122     +20 -8     src/sys/sys/socketvar.h



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