Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Still wish the Linux kernel had zero-copy IPC with pipes. vmsplice(1) can zero-copy data into the pipe, but the destination process cannot vmsplice(1) the data out of the pipe without incurring a copy.


Modifying virtual mappings tends to be just as expensive as copying.


I'd be curious to see if this is still true with large page sizes and to see on current processors where the cross over point is.


I've never tried it, but shouldn't you be able to vmsplice into the pipe, splice from pipe to an actual file and mmap the file? Probably the cost of the additional splice call offsets the saved copy.

It is possible to implement a simple shared memory queue which does not requires syscalls unless empty or full, and the time saved avoiding system calls (and expensive VM manipulation) might be more than the cost of copying data in and out for many applications.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: