1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-11 14:10:34 +00:00
freebsd/sys/netinet
Robert Watson 7abab91135 sblock() implements a sleep lock by interlocking SB_WANT and SB_LOCK flags
on each socket buffer with the socket buffer's mutex.  This sleep lock is
used to serialize I/O on sockets in order to prevent I/O interlacing.

This change replaces the custom sleep lock with an sx(9) lock, which
results in marginally better performance, better handling of contention
during simultaneous socket I/O across multiple threads, and a cleaner
separation between the different layers of locking in socket buffers.
Specifically, the socket buffer mutex is now solely responsible for
serializing simultaneous operation on the socket buffer data structure,
and not for I/O serialization.

While here, fix two historic bugs:

(1) a bug allowing I/O to be occasionally interlaced during long I/O
    operations (discovere by Isilon).

(2) a bug in which failed non-blocking acquisition of the socket buffer
    I/O serialization lock might be ignored (discovered by sam).

SCTP portion of this patch submitted by rrs.
2007-05-03 14:42:42 +00:00
..
libalias o Kill EOLWS while I'm here. 2007-04-30 20:26:11 +00:00
accf_data.c
accf_http.c /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
icmp6.h sync with KAME regarding NDP 2005-10-21 16:23:01 +00:00
icmp_var.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
if_atm.c Add newline to debuging printf. 2005-08-26 15:27:18 +00:00
if_atm.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
if_ether.c Remove global list of all llinfo_arp entries and use a callout per 2007-03-22 10:37:53 +00:00
if_ether.h Add CARP (Common Address Redundancy Protocol), which allows multiple 2005-02-22 13:04:05 +00:00
igmp_var.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
igmp.c Improve style(9) conformance of igmp.c. 2006-12-04 00:41:48 +00:00
igmp.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
in_cksum.c /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
in_gif.c With exception of the if_name() macro, all definitions in net_osdep.h 2006-08-04 21:27:40 +00:00
in_gif.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
in_pcb.c Remove unused pcbinfo arguments to in_setsockaddr() and 2007-05-01 16:31:02 +00:00
in_pcb.h Remove unused pcbinfo arguments to in_setsockaddr() and 2007-05-01 16:31:02 +00:00
in_proto.c Build PIM by default as part of the IPv4 multicast forwarding path. 2007-02-10 13:59:13 +00:00
in_rmx.c Complete timebase (time_second -> time_uptime) conversion. 2006-07-05 23:37:21 +00:00
in_systm.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
in_var.h Implement reference counting for ifmultiaddr, in_multi, and in6_multi 2007-03-20 00:36:10 +00:00
in.c Fix a bug in IPv4 address configuration exposed by refcounting. 2007-03-29 21:39:22 +00:00
in.h Add INADDR_ALLRPTS_GROUP define for 224.0.0.22 for future IGMPv3 support. 2007-02-27 14:45:37 +00:00
ip6.h move RFC3542 related definitions into ip6.h. 2005-07-20 10:30:52 +00:00
ip_carp.c Since rev. 1.94 of netinet/in.c, the netinet layer frees all its 2007-02-02 09:39:09 +00:00
ip_carp.h Make sure that carp_header is 36 bytes long 2006-12-01 18:37:41 +00:00
ip_divert.c Remove unused pcbinfo arguments to in_setsockaddr() and 2007-05-01 16:31:02 +00:00
ip_divert.h
ip_dummynet.c - Use non-recursive mutex. MTX_RECURSE is unnecessary since rev. 1.70 2006-10-29 12:09:24 +00:00
ip_dummynet.h When sending a packet from dummynet, indicate that we're forwarding 2006-02-14 06:36:39 +00:00
ip_ecn.c /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ip_ecn.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ip_encap.c With exception of the if_name() macro, all definitions in net_osdep.h 2006-08-04 21:27:40 +00:00
ip_encap.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ip_fastfwd.c In IPv4 fast forwarding path, send ICMP unreachable messages for 2007-03-18 23:05:20 +00:00
ip_fw2.c Shorten text string for ip_fw2 dynamic rules zone by removing the word 2007-04-17 09:28:36 +00:00
ip_fw_pfil.c Summer of Code 2005: improve libalias - part 2 of 2 2006-12-29 21:59:17 +00:00
ip_fw.h Summer of Code 2005: improve libalias - part 2 of 2 2006-12-29 21:59:17 +00:00
ip_gre.c Fix the following bpf(4) race condition which can result in a panic: 2006-06-02 19:59:33 +00:00
ip_gre.h Fix stack corruptions on amd64. 2006-01-21 10:44:34 +00:00
ip_icmp.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
ip_icmp.h Pass icmp_error() the MTU argument directly instead of 2005-05-04 13:09:19 +00:00
ip_id.c /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
ip_input.c Replace a comment about RSVP/mrouting with a different but similar comment 2007-03-25 21:49:50 +00:00
ip_ipsec.c Remove unneeded mac.h include. 2006-07-06 13:25:01 +00:00
ip_ipsec.h Move the IPSEC related code blocks to their own file to unclutter 2006-02-01 13:55:03 +00:00
ip_mroute.c Diff reduction with NetBSD; use IN_LOCAL_GROUP() to check if an address 2007-03-15 08:44:22 +00:00
ip_mroute.h Store the cached route in vifp in the normal send_packet() case. 2007-02-08 23:05:08 +00:00
ip_options.c Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h 2006-10-22 11:52:19 +00:00
ip_options.h Move MAX_IPOPTLEN and struct ipoption back into ip_var.h as 2005-11-19 14:01:32 +00:00
ip_output.c Purge two redundant case labels. 2007-03-23 09:43:36 +00:00
ip_var.h Some local and style(9) cleanups. 2007-04-04 15:30:31 +00:00
ip.h Marking this as __packed was needed to get the alignment and offset of 2007-01-12 07:23:31 +00:00
ipprotosw.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
pim_var.h Remove public declarations of variables that were forgotten when they were 2005-08-10 07:10:02 +00:00
pim.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
raw_ip.c Remove unused pcbinfo arguments to in_setsockaddr() and 2007-05-01 16:31:02 +00:00
sctp_asconf.c - fixed several places where we did not release INP locks. 2007-04-03 11:15:32 +00:00
sctp_asconf.h - Sysctl's move to seperate file 2007-03-15 11:27:14 +00:00
sctp_auth.c - Somehow the disable fragment option got lost. We could 2007-05-02 12:50:13 +00:00
sctp_auth.h - Sysctl's move to seperate file 2007-03-15 11:27:14 +00:00
sctp_bsd_addr.c - Somehow the disable fragment option got lost. We could 2007-05-02 12:50:13 +00:00
sctp_bsd_addr.h - fixed several places where we did not release INP locks. 2007-04-03 11:15:32 +00:00
sctp_constants.h - Somehow the disable fragment option got lost. We could 2007-05-02 12:50:13 +00:00
sctp_crc32.c - fix source address selection when picking an acceptable address 2007-04-14 09:44:09 +00:00
sctp_crc32.h - most all includes (#include <>) migrate to the sctp_os_bsd.h file 2007-01-18 09:58:43 +00:00
sctp_header.h - Somehow the disable fragment option got lost. We could 2007-05-02 12:50:13 +00:00
sctp_indata.c - Somehow the disable fragment option got lost. We could 2007-05-02 12:50:13 +00:00
sctp_indata.h - Somehow the disable fragment option got lost. We could 2007-05-02 12:50:13 +00:00
sctp_input.c - Somehow the disable fragment option got lost. We could 2007-05-02 12:50:13 +00:00
sctp_input.h - most all includes (#include <>) migrate to the sctp_os_bsd.h file 2007-01-18 09:58:43 +00:00
sctp_lock_bsd.h - More work on making send lock contention. 2007-04-19 11:28:43 +00:00
sctp_os_bsd.h - Somehow the disable fragment option got lost. We could 2007-05-02 12:50:13 +00:00
sctp_os.h - Sysctl's move to seperate file 2007-03-15 11:27:14 +00:00
sctp_output.c - Somehow the disable fragment option got lost. We could 2007-05-02 12:50:13 +00:00
sctp_output.h - Somehow the disable fragment option got lost. We could 2007-05-02 12:50:13 +00:00
sctp_pcb.c - Somehow the disable fragment option got lost. We could 2007-05-02 12:50:13 +00:00
sctp_pcb.h - Somehow the disable fragment option got lost. We could 2007-05-02 12:50:13 +00:00
sctp_peeloff.c - Somehow the disable fragment option got lost. We could 2007-05-02 12:50:13 +00:00
sctp_peeloff.h - most all includes (#include <>) migrate to the sctp_os_bsd.h file 2007-01-18 09:58:43 +00:00
sctp_structs.h - Somehow the disable fragment option got lost. We could 2007-04-22 11:06:27 +00:00
sctp_sysctl.c - fixed several places where we did not release INP locks. 2007-04-03 11:15:32 +00:00
sctp_sysctl.h - fixed several places where we did not release INP locks. 2007-04-03 11:15:32 +00:00
sctp_timer.c - fix source address selection when picking an acceptable address 2007-04-14 09:44:09 +00:00
sctp_timer.h - most all includes (#include <>) migrate to the sctp_os_bsd.h file 2007-01-18 09:58:43 +00:00
sctp_uio.h - Somehow the disable fragment option got lost. We could 2007-04-22 11:06:27 +00:00
sctp_usrreq.c - Somehow the disable fragment option got lost. We could 2007-05-02 12:50:13 +00:00
sctp_var.h - More work on making send lock contention. 2007-04-19 11:28:43 +00:00
sctp.h - Somehow the disable fragment option got lost. We could 2007-05-02 12:50:13 +00:00
sctputil.c sblock() implements a sleep lock by interlocking SB_WANT and SB_LOCK flags 2007-05-03 14:42:42 +00:00
sctputil.h - Somehow the disable fragment option got lost. We could 2007-05-02 12:50:13 +00:00
tcp_debug.c /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
tcp_debug.h o Use a define for a buffer size. 2007-03-24 22:15:02 +00:00
tcp_fsm.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
tcp_hostcache.c Match up SYSCTL declarations in style. 2007-03-21 19:34:12 +00:00
tcp_input.c o Fix INP lock leak in the minttl case 2007-04-23 19:41:47 +00:00
tcp_output.c o Remove unused and redundant TCP option definitions 2007-04-20 15:08:09 +00:00
tcp_reass.c o Fix INP lock leak in the minttl case 2007-04-23 19:41:47 +00:00
tcp_sack.c Change the TCP timer system from using the callout system five times 2007-04-11 09:45:16 +00:00
tcp_seq.h Remove T/TCP RFC1644 Connection Count comparison macros. They are no longer 2006-06-18 14:24:12 +00:00
tcp_subr.c Rename some fields of struct inpcbinfo to have the ipi_ prefix, 2007-04-30 23:12:05 +00:00
tcp_syncache.c o Remove unused and redundant TCP option definitions 2007-04-20 15:08:09 +00:00
tcp_timer.c Change the TCP timer system from using the callout system five times 2007-04-11 09:45:16 +00:00
tcp_timer.h Make "struct tcp_timer" visible only to the kernel, and unbreak world. 2007-04-11 14:08:42 +00:00
tcp_timewait.c Rename some fields of struct inpcbinfo to have the ipi_ prefix, 2007-04-30 23:12:05 +00:00
tcp_usrreq.c Remove unused pcbinfo arguments to in_setsockaddr() and 2007-05-01 16:31:02 +00:00
tcp_var.h o Remove unncessary TOF_SIGLEN flag from struct tcpopt 2007-04-20 15:28:01 +00:00
tcp.h o Remove unused and redundant TCP option definitions 2007-04-20 15:08:09 +00:00
tcpip.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
udp_usrreq.c Remove unused pcbinfo arguments to in_setsockaddr() and 2007-05-01 16:31:02 +00:00
udp_var.h Rename two identically named log_in_vain variables: tcp_input.c's static 2007-02-20 10:20:03 +00:00
udp.h Gratuitous UDP restyling toward style(9) in 7.x. 2007-02-20 10:13:11 +00:00