Re: zero-copy TCP fileserving

Pete Wyckoff (wyckoff@ca.sandia.gov)
Fri, 24 Sep 1999 10:27:37 -0700


davem@redhat.com said:
> Date: Fri, 24 Sep 1999 09:45:04 -0700
> From: Pete Wyckoff <wyckoff@ca.sandia.gov>
>
> I added small modifications a while back to 2.2.3 to use this, with
> a packet engines gigE card. The driver sets a bit in the dev
> structure saying it knows how to do tx checksum, then the IP output
> path notices and does only the pseudo header. Hardware adds in the
> packet body checksum.
>
> The impact on bandwidth was, however, minimal. At least for 500
> MHz alpha machines.
>
> Because the csum_partial_copy_from_user done in the TCP transmit path
> gets the checksum at zero cost. Just eliminating the checksum is
> going to buy little if anything (in fact on some cpus it's going to
> cost more to "avoid" the csum part of the copy), the real gain is
> avoiding the copy as well.
>
> You'd need to, in tcp sendmsg:
[ a whole lot more work ]

> This is the whole point of "zero-copy" TCP, or did I miss something in
> the changes you did?

Right you are. I only avoided the checksum calculation, which is hardly
worth it for modern processors even though the NIC will do it for you.

One could further argue that TCP is not the protocol of choice if
you're looking to minimize transfer latency. There's still the receive
path to worry about, for instance.

-- Pete

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