Re: [PATCH] splice support #2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux