lkml.org 
[lkml]   [2000]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: zero-copy TCP

On 2 Sep 2000, Jes Sorensen wrote:

> You can't DMA directly from a file cache page unless you have a
> network card that does scatter/gather DMA and surprise surprise,
> 80-90% of the cards on the market don't support this. [...]

exactly. The TUX patch solves this by copying 'multi-fragment skbs' into a
temporary single-fragment skb, if the card doesnt support scatter-gather,
64-bit DMA. This way the copying is delayed as much as possible, to the
point where we queue the packet to the network device.

> Besides that you need to do copy-on-write if you want to be able to do
> zero copy on write() from user space [...]

i agree that this is hard - i'm not sure wether we want to go the pain to
enable anonymous-buffer write()s do zero-copy. My plan is to enable
sendfile() first - it should cover all the important high-performance
server cases. The point is that a write() is only used if some sort of
dynamic data is generated on the fly. If data is generated once and sent
once then there is no much win in zero-copy. If data is generated once and
reused multiple times afterwards then it should rather be written into a
temporary file and then it can be sent out via sendfile().

Ingo

-
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.172 / U:3.912 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site