[lkml]   [2003]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] TCP Zero Copy for mmapped files
On Thu, Jan 02, 2003 at 03:13:46PM -0800, David S. Miller wrote:
> From: Thomas Ogrisegg <>
> Date: Thu, 2 Jan 2003 23:12:11 +0100
> It's a bug.

I see. Ok, that can be fixed easily.

> Sure we cannot remove sendfile now, as some applications
> depends on it, but that's not what I wanted.
> That's not what I'm talking about. I'm saying, making this
> mmap thing available makes no sense at all.

No. For portable applications it makes great sense.

> I made this patch, so that _portable_ applications (and sendfile
> is miles away from beeing portable - even if the target has a
> sendfile systemcall, its highly unlikely that it has the same
> semantics as Linux' sendfile) are sped up.
> This isn't a priority for us. People who want the best possible
> performance can code their apps up to take advantage of sendfile()
> on systems that have it.

So you want to chain people to your "propritaery solution"?

> (and really, show me how many systems
> lack a sendfile mechanism these days).

What kind of systems are you talking about? Operating systems?
Nearly all.

> However, I didn't like the VM waste either, but I believe there
> is no other way.
> There is a way, convert to sendfile.

It might be a bit difficult to convert all applications to
sendfile. Especially those for which you don't have the
source code.

> But it worked? If I didn't misunderstood #1 then I don't see a
> problem for integrating it into the current kernel.
> I think you need to rethink the multiple VMA case in #1, and
> also understand why I don't want this facility in the tree
> at all anyways. Apps can convert to sendfile(), and as a result
> they'll get improved performance on ALL linux kernels, not just
> the ones with your special patch applied.

I don't see your point. Applications which really need the
performance will switch to sendfile anyway because of the
problems with mmap, you mentioned.

My patch is very simple and takes less than 1KB of code but
will speed up many applications and doesn't have a real
drawback (except when sending "normal" data which is larger
than a page - but that shouldn't happen very often).

Yet another advantage of my version is that you can use it
in conjunction with writev.

Unfortunately the linux-sendfile is not as good as the HP-UX
one. Under HP-UX you can define a "struct iovec" header to
be sent before the file is sent.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:32    [W:0.052 / U:1.824 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site