Log in

No account? Create an account
splice() / wire() / tee() ... whatever - brad's life — LiveJournal [entries|archive|friends|userinfo]
Brad Fitzpatrick

[ website | bradfitz.com ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

splice() / wire() / tee() ... whatever [Jan. 20th, 2005|02:10 am]
Brad Fitzpatrick
Linus silently submitted a patch into the 2.6 series recently to redo how pipes are implemented, with the later-stated long term goal of being able to splice and tee file descriptors together in the kernel.

More details: http://lwn.net/Articles/118750/

But it's turning out to not be too long term -- he recently showed some inital code to implement some of it.

I'm excited because it means Perlbal will have to do a LOT less copying. It's like sendfile, except you're able to wire ("splice") arbitrary fds together, regardless of whether they're page-backed or socket-backed. (which is why we can't use sendfile() from one socket to another socket, which is what Perlbal wants to do....)

[User Picture]From: bsdguru
2005-01-20 02:41 pm (UTC)

Does this mean you are abstracting OS specific code?

Is there plans to abstract all the linuxisms into their own Linux.pm file so that Linux specific code is in there, FreeBSD.pm for FreeBSD specific etc?
(Reply) (Thread)
[User Picture]From: brad
2005-01-20 08:14 pm (UTC)

Re: Does this mean you are abstracting OS specific code?

We try and detect features and fall back. For instance, if you don't have sendfile() now we do a read and write.
(Reply) (Parent) (Thread)