Re: Syslets, Threadlets, generic AIO support, v6

From: Eric Dumazet
Date: Wed May 30 2007 - 16:11:12 EST


Linus Torvalds a écrit :

On Wed, 30 May 2007, Mark Lord wrote:
I wonder how useful it would be to reimplement sendfile()
using splice(), either in glibc or inside the kernel itself?

I'd like that, if only because right now we have two separate paths that kind of do the same thing, and splice really is the only one that is generic.

I thought Jens even had some experimental patches for it. It might be worth to "just do it" - there's some internal overhead, but on the other hand, it's also likely the best way to make sure any issues get sorted out.


Last time I played with splice(), I found a bug with readahead logic, most probably because nobody but me tried it before.

(corrected by Fengguang Wu in commit 9ae9d68cbf3fe0ec17c17c9ecaa2188ffb854a66 )

So yes, reimplement sendfile() should help to find last splice() bugs, and as a bonus it could add non blocking disk io, (O_NONBLOCK on input file -> socket)


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