Re: zero-copy TCP fileserving

Richard B. Johnson (root@chaos.analogic.com)
Thu, 3 Jun 1999 08:48:21 -0400 (EDT)


> > This simple zero-copy isn't really a win on most PC hardware as it takes
> > about the same amount of time to do a checksum as it does to do a checksum
> > and copy.
>
> But for the hardware I'm running this on, a checksum + copy takes at least
> twice the time as a checksum (simple - read vs read/write). And this is
^^^^^^^^^^^^^^^^^^^^^^^^^^^

No, not at all. With memory-to-memory copy, you are I/O bound. With any
CPU that runs faster than memory access (anything faster than a
486-DX/66), you get the checksumming for free if the code is properly
written, which Linux's checksum while copy sees to be.

Also DMA (even if it worked) is not free. The wall clock still runs while
the user-space page(s) are locked into memory.

Cheers,
Dick Johnson
***** FILE SYSTEM WAS MODIFIED *****
Penguin : Linux version 2.2.6 on an i686 machine (400.59 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.

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