Re: zero-copy TCP

From: Jeff V. Merkey (jmerkey@timpanogas.com)
Date: Sat Sep 02 2000 - 16:45:42 EST


Alan Cox wrote:
>
> > to MANOS, and what a mess indeed. In NetWare, the only time data ever
> > gets copied from incoming packets is:
> >
> > 1. A copy to userspace at a stream head.
> > 2. An incoming write that gets copied into the file cache.
>
> 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
kinds of handles lookups, linear list searching like

while (x)
{
  x = x->next
}

all over the place that increases latency. Not to mention the overhead
of the type of interrupt and trap gates that suck up about 50 clocks to
fetch the IDT, PDE, and GDT tables for every interrupt. NetWare copies
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?

Jeff
-
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/



This archive was generated by hypermail 2b29 : Thu Sep 07 2000 - 21:00:14 EST