lkml.org 
[lkml]   [2000]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: zero-copy TCP
Date
From
> > Sounds like Linux - one DMA and one copy to user space.
>
> Alan, Please. I'm in your code and there are copies all over the
> place. I agree you have a "fast path" for most stuff, but there's all

There arent copies all over the case for the paths that occur. Like 99.999%
of the time. Fragmented packets dont happen except for NFS (which is a rather
broken protocol anyway).

One DMA, one copy to user space

> kinds of handles lookups, linear list searching like
>
> while (x)
> {
> x = x->next
> }

timers are constructed to be close to O(1), the tcp hash isnt a linear lookup,
the socket operations from user space use file-> dereferences not a lookup

> nothing in TCPIP except at the stream head. Why do you need to copy
> data anyway to checksum an IP packet anyway? I noticed you do the right
> thing and keep the headers and data as separate fragments during header
> construction, so why do you need to copy data for checksumming?

We dont copy for checksumming. We fold the single user space copy and the
checksum operation into one path, because on any modern CPU it costs precisely
the same to copy as to copy/checksum.

I don't think you've actually sat and instrumented the TCP code


Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.133 / U:1.568 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site