Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: syssrc/sys



Module Name:    syssrc
Committed By:   thorpej
Date:           Wed Jul  3 19:06:55 UTC 2002

Modified Files:
        syssrc/sys/dev: kttcp.c
        syssrc/sys/kern: uipc_socket.c uipc_socket2.c
        syssrc/sys/netccitt: if_x25subr.c pk_output.c pk_usrreq.c
        syssrc/sys/netinet: tcp_input.c tcp_usrreq.c
        syssrc/sys/sys: socketvar.h

Log Message:
Make insertion of data into socket buffers O(C):
* Keep pointers to the first and last mbufs of the last record in the
  socket buffer.
* Use the sb_lastrecord pointer in the sbappend*() family of functions
  to avoid traversing the packet chain to find the last record.
* Add a new sbappend_stream() function for stream protocols which
  guarantee that there will never be more than one record in the
  socket buffer.  This function uses the sb_mbtail pointer to perform
  the data insertion.  Make TCP use sbappend_stream().

On a profiling run, this makes sbappend of a TCP transmission using
a 1M socket buffer go from 50% of the time to .02% of the time.

Thanks to Bill Sommerfeld and YAMAMOTO Takashi for their debugging
assistance!


To generate a diff of this commit:
cvs rdiff -r1.1 -r1.2 syssrc/sys/dev/kttcp.c
cvs rdiff -r1.68 -r1.69 syssrc/sys/kern/uipc_socket.c
cvs rdiff -r1.42 -r1.43 syssrc/sys/kern/uipc_socket2.c
cvs rdiff -r1.28 -r1.29 syssrc/sys/netccitt/if_x25subr.c
cvs rdiff -r1.16 -r1.17 syssrc/sys/netccitt/pk_output.c
cvs rdiff -r1.21 -r1.22 syssrc/sys/netccitt/pk_usrreq.c
cvs rdiff -r1.146 -r1.147 syssrc/sys/netinet/tcp_input.c
cvs rdiff -r1.71 -r1.72 syssrc/sys/netinet/tcp_usrreq.c
cvs rdiff -r1.51 -r1.52 syssrc/sys/sys/socketvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index