andre e66ed06df4 Add soreceive_stream(), an optimized version of soreceive() for
stream (TCP) sockets.

It is functionally identical to generic soreceive() but has a
number stream specific optimizations:
o does only one sockbuf unlock/lock per receive independent of
  the length of data to be moved into the uio compared to
  soreceive() which unlocks/locks per *mbuf*.
o uses m_mbuftouio() instead of its own copy(out) variant.
o much more compact code flow as a large number of special
  cases is removed.
o much improved reability.

It offers significantly reduced CPU usage and lock contention
when receiving fast TCP streams.  Additional gains are obtained
when the receiving application is using SO_RCVLOWAT to batch up
some data before a read (and wakeup) is done.

This function was written by "reverse engineering" and is not
just a stripped down variant of soreceive().

It is not yet enabled by default on TCP sockets.  Instead it is
commented out in the protocol initialization in tcp_usrreq.c
until more widespread testing has been done.

Testers, especially with 10GigE gear, are welcome.

MFP4:	r164817 //depot/user/andre/soreceive_stream/
2009-06-22 23:08:05 +00:00
..
2009-06-09 23:24:04 +00:00
2008-10-27 11:45:31 +00:00
2006-08-16 09:34:56 +00:00
2009-01-01 02:08:56 +00:00
2009-01-01 02:08:56 +00:00
2009-05-27 16:36:54 +00:00
2009-01-01 02:29:17 +00:00
2009-05-20 17:59:49 +00:00
2009-05-09 19:01:24 +00:00
2006-09-22 22:11:29 +00:00
2009-01-01 02:11:01 +00:00
2007-02-06 16:24:57 +00:00
2009-06-03 17:19:12 +00:00
2008-09-22 10:37:02 +00:00
2006-11-11 16:19:12 +00:00
2008-07-23 16:44:20 +00:00
2009-06-22 20:24:03 +00:00
2009-06-22 20:24:03 +00:00
2009-06-22 20:24:03 +00:00
2009-05-07 13:49:48 +00:00
2006-03-01 06:48:31 +00:00
2009-03-01 04:57:23 +00:00
2009-01-31 10:04:36 +00:00
2009-06-22 21:19:24 +00:00