From owner-cvs-all@FreeBSD.ORG Mon Jun 14 18:16:22 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CE6A716A4CE; Mon, 14 Jun 2004 18:16:22 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B14F343D48; Mon, 14 Jun 2004 18:16:22 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i5EIGMaf075224; Mon, 14 Jun 2004 18:16:22 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i5EIGM7h075223; Mon, 14 Jun 2004 18:16:22 GMT (envelope-from rwatson) Message-Id: <200406141816.i5EIGM7h075223@repoman.freebsd.org> From: Robert Watson Date: Mon, 14 Jun 2004 18:16:22 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD 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... X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jun 2004 18:16:22 -0000 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