lkml.org 
[lkml]   [2006]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] splice support #2

Let me pull back from the details a bit, to note a code pattern I'm
beginning to see:

if (src_fd is a file &&
dest_fd is a socket)
sendfile()
else
hand code fd->fd data move

with splice this becomes

if (special case fd combination #1)
sendfile()
else (special case fd combination #2)
splice()
else
hand code fd->fd data move

Creating a syscall for each fd->fd data move case seems wasteful. I
would rather that the kernel Does The Right Thing so the app doesn't
have to support all these special cases. Handling the implicit buffer
case in the kernel, when needed, means that the app is future-proofed:
when another fd->fd optimization is implemented, the app automatically
takes advantage of it.

Jeff


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

\
 
 \ /
  Last update: 2006-03-30 22:50    [W:1.407 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site