Re: [PATCH] TCP Zero Copy for mmapped files

Alan Cox (alan@lxorguk.ukuu.org.uk)
03 Jan 2003 00:56:59 +0000


On Thu, 2003-01-02 at 23:16, David S. Miller wrote:
> It depends how predictable your content is. With a 64bit box and a porn
> server its probably quite tidy
>
> Let's say you have infinite VM (which is what 64-bit almost is :) then
> the cost is setting up all of these useless VMAs for each and every
> file (which is a 1 time cost, ok), and also the VMA lookup each
> write() call.
>
> With sendfile() all of this goes straight to the page cache directly
> without a VMA lookup.

With a nasty unpleasant splat the moment you do modification on the
content at all. For static objects sendfile is certainly superior,

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