dean gaudet writes:
> is this too slow for some reason? (does it play well with zero-copy?)
His trick ends up with a minimal set of scatter gather entries.
That's the whole gain behind the trick he's doing.
If you do the TCP_CORK thing, what you end up with is a scatter gather
entry in the SKB for the header bits, then the page cache segments.
Even if we had the HP sendfile() interface iovec garbage, we would end
up with the same number of SKB iovec entries as for the TCP_CORK case
What TUX basically does is build up the header by hand in a scribble
page it uses for header builing, passes that to tcp_sendpage() with
MSG_MORE set, then it initiates the sendfile() part. The final effect
inside the networking is basically equivalent to using
TCP_CORK+sendfile() in userspace, the only difference being that:
1) the scratch page for the headers is maintained per-socket by TCP
2) the header is copied once from user to kernel
I would find it amusing to see what adding the header+file caching
trick to TUX would do to it's results :-)
David S. Miller
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to email@example.com
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Mon Apr 30 2001 - 21:00:24 EST