Messages in this thread | | | Date | Wed, 16 Oct 2002 02:59:35 -0700 (PDT) | Subject | Re: sendfile(2) behaviour has changed ? | From | "David S. Miller" <> |
| |
From: Matti Aarnio <matti.aarnio@zmailer.org> Date: Wed, 16 Oct 2002 12:10:46 +0300
On Wed, Oct 16, 2002 at 10:49:08AM +0200, Zilvinas Valinskas wrote: > Is this expected behaviour ? that sendfile(2) on 2.5.4x linux kernel requires > socket as an output fd paramter ? It has only been intended for output to a TCP stream socket.
To be honest, I'm not so sure about this.
For example, I definitely see us supporting this in the opposite direction when commodity 10gbit hits the market.
Initially I thought "sys_receivefile()" but it makes no sense when we have a system call that is perfectly capable of describing the tcp_socket --> page_cache operation.
And I don't think the vfs copy operation using sendfile is such a bad thing either. It definitely opens the door for some interesting optimizations. For example, if the source page is not mapped by a process it could be possible to just unhash it, mark it dirty, then hash it into the destination file. Exactly 2 I/O operations and the cpu doesn't touch the data at all. - 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/
| |