1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00
Mirror of the FreeBSD src repository https://git.FreeBSD.org/src.git .
Go to file
Bill Fenner dece5b6a43 Introduce (fairly hacky) workaround for odd TCP behavior with application
writes of size (100,208]+N*MCLBYTES.

The bug:
 sosend() hands each mbuf off to the protocol output routine as soon as it
 has copied it, in the hopes of increasing parallelism (see
  http://www.kohala.com/~rstevens/vanj.88jul20.txt ). This works well for
 TCP as long as the first mbuf handed off is at least the MSS.  However,
 when doing small writes (between MHLEN and MINCLSIZE), the transaction is
 split into 2 small MBUF's and each is individually handed off to TCP.
 TCP assumes that the first small mbuf is the whole transaction, so sends
 a small packet.  When the second small mbuf arrives, Nagle prevents TCP
 from sending it so it must wait for a (potentially delayed) ACK.  This
 sends throughput down the toilet.

The workaround:
 Set the "atomic" flag when we're doing small writes.  The "atomic" flag
 has two meanings:
 1. Copy all of the data into a chain of mbufs before handing off to the
    protocol.
 2. Leave room for a datagram header in said mbuf chain.
 TCP wants the first but doesn't want the second.  However, the second
 simply results in some memory wastage (but is why the workaround is a
 hack and not a fix).

The real fix:
 The real fix for this problem is to introduce something like a "requested
 transfer size" variable in the socket->protocol interface.  sosend()
 would then accumulate an mbuf chain until it exceeded the "requested
 transfer size".  TCP could set it to the TCP MSS (note that the
 current interface causes strange TCP behaviors when the MSS > MCLBYTES;
 nobody notices because MCLBYTES > ethernet's MTU).
1998-07-06 19:27:14 +00:00
bin Pick up kernel variables/constants using sysctl rather than through /dev/mem 1998-06-30 21:34:14 +00:00
contrib Fixed printf format errors. 1998-06-30 20:14:13 +00:00
crypto Fix nasty typo that randomly caused kinit to not properly deduce the 1998-03-29 07:27:43 +00:00
etc Fix spelling error. 1998-07-04 22:10:20 +00:00
games Fixed printf format errors. 1998-06-30 19:10:49 +00:00
gnu Fixed printf format errors. 1998-06-30 20:48:45 +00:00
include Complete the switch to using gcc-2.4 features to declare fpos_t , 1998-06-14 16:04:20 +00:00
kerberos5
kerberosIV Debogotify. ln -f should be ln -s to allow the obj/ dir to be 1998-03-28 07:47:05 +00:00
lib fts_close calls free(sp), the ISSET(FTS_NOCHDIR) which is a macro that 1998-07-03 08:21:05 +00:00
libexec Clean up grammar. Provide proper pathnames for spool directories. 1998-07-01 05:47:58 +00:00
lkm Fix the N'th occurance of missed bits due to opt_???? mucking. 1998-07-02 14:09:44 +00:00
release Add entry for Dell Poweredge XE. 1998-07-03 14:04:32 +00:00
sbin Restored rev.1.11, which I somehow clobbered in rev.1.12. 1998-07-06 19:11:35 +00:00
secure Staticise a variable. 1997-10-08 07:02:48 +00:00
share Fix argument reversal in example. 1998-07-02 05:37:33 +00:00
sys Introduce (fairly hacky) workaround for odd TCP behavior with application 1998-07-06 19:27:14 +00:00
tools Add mid scripts. Mid is a tool which create a Message-ID database 1998-05-20 09:20:02 +00:00
usr.bin Fix bug from last commit: don't SEGV when reading as part of a pipe. 1998-07-04 01:22:07 +00:00
usr.sbin Correct use of .Nm. Spelling. Add rcsid and remove unused #includes. 1998-07-06 07:19:27 +00:00
COPYRIGHT
Makefile Added yacc to the bootstrap tools. It is needed very early to 1998-06-17 09:34:42 +00:00
Makefile.alpha Add perl to the list of build tools because it is needed to build the 1998-05-12 23:11:58 +00:00
README Re-alphabetize and update the subdir descriptions. 1998-06-30 08:08:05 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on: $Id: README,v 1.11 1997/08/09 14:36:20 jkh Exp $

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel and the contents of /etc.  Please see the top of the Makefile
in this directory for more information on the standard build targets
and compile-time flags.

Building a kernel with config(8) is a somewhat more involved process,
documentation for which can be found at:
   http://www.freebsd.org/handbook/kernelconfig.html
And in the config(8) man page.

The sample kernel configuration files reside in the sys/i386/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file LINT contains entries for all possible devices, not
just those commonly used, and is meant more as a general reference
than an actual kernel configuration file (a kernel built from it
wouldn't even run).


Source Roadmap:
---------------
bin		System/User commands.

contrib		Packages contributed by 3rd parties.

crypto		Export controlled stuff (see crypto/README).

etc		Template files for /etc

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberosIV	Kerberos package - also export controlled.

lib		System libraries.

libexec		System daemons.

lkm		Loadable Kernel Modules.

release		Release building Makefile & associated tools.

sbin		System commands.

secure		DES and DES-related utilities - NOT FOR EXPORT!

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/handbook/synching.html